[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev lynx's image size reduction
From: |
dickey |
Subject: |
Re: lynx-dev lynx's image size reduction |
Date: |
Mon, 15 Mar 1999 09:12:10 -0500 (EST) |
> Here is a recipe how the lynx image size can be reduced:
> Several arrays can be substituted with pointers, which should be
> initialized by malloc at initialization. Here are sizes of arrays that can
> be eliminated this way ( for lynx-2.8.2dev19 compiled by GCC 2.7.2.3 on
> i386-linux-gnu without lss support, no options to 'configure' )
> LYMain.c: sizeof(links) = 49152
> LYMain.c: sizeof(history) = 40960
>
> Ie ~90K can be eliminated. Moreover, compiling with lss support, adds the
> following arrays to the mentioned above:
> LYStyle.c: sizeof(hashStyles)=196632
> GridText.c: sizeof(cached_styles)=32768
>
> This means that 319512 bytes can be eliminated from lynx compiled with
> lss support. Frankly speaking, cached_styles in GridText.c is a 2d array,
> so the trick that is applicable to 1d arrays won't work, but it's only
> 32K.
not really. those arrays are still allocated (and uninitialized data don't
make the executable file larger).
allocating the arrays is ok for other reasons (making the program more
configurable).
> Best regards,
> -Vlad
--
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey