[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev lynx's image size reduction
From: |
Vlad Harchev |
Subject: |
lynx-dev lynx's image size reduction |
Date: |
Sat, 13 Mar 1999 05:39:24 +0400 (SAMT) |
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.
Best regards,
-Vlad
- lynx-dev lynx's image size reduction,
Vlad Harchev <=