[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev lynx's image size reduction
From: |
Vlad Harchev |
Subject: |
Re: lynx-dev lynx's image size reduction |
Date: |
Sat, 13 Mar 1999 09:52:26 +0400 (SAMT) |
On Mon, 15 Mar 1999 address@hidden wrote:
> > 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).
Frankly speaking I don't know whether uninitialized data don't make the
executable file larger or not for such OSes as DOS or Windows.
> 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
>
Best regards,
-Vlad