[PATCH] RFC: reduce static data usage
Denis Vlasenko
vda.linux at googlemail.com
Sat Jul 21 15:25:18 UTC 2007
Hi,
[hopefully this mail is under ml size limit]
These six patches make uclibc malloc big(ger) buffers instead of
keeping them in data/bss - should help NOMMU people.
patch #1: introduce __uc_malloc, so that users can intercept OOM.
patch #2: convert des.c to use __uc_malloc (-70 kbytes of bss)
patch #3: convert resolv.c
patch #4: convert pwd_grp.c
patch #5: convert utent.c, getpass.c
patch #6: convert getnetent.c, md5.c
This deals with almost all buffers bigger than 100 bytes.
We pay in code size for that (+20 - +40 bytes per module
on i386):
text data bss dec hex filename
- 584 8 384 976 3d0 utent.o
+ 611 8 4 623 26f utent.o
- 38 0 288 326 146 fgetgrent.o
+ 63 0 4 67 43 fgetgrent.o
- 38 0 288 326 146 fgetpwent.o
+ 63 0 4 67 43 fgetpwent.o
- 38 0 320 358 166 fgetspent.o
+ 63 0 4 67 43 fgetspent.o
- 34 0 288 322 142 getgrent.o
+ 59 0 4 63 3f getgrent.o
- 38 0 288 326 146 getgrgid.o
+ 63 0 4 67 43 getgrgid.o
- 38 0 288 326 146 getgrnam.o
+ 63 0 4 67 43 getgrnam.o
- 34 0 288 322 142 getpwent.o
+ 59 0 4 63 3f getpwent.o
- 38 0 288 326 146 getpwnam.o
+ 63 0 4 67 43 getpwnam.o
- 38 0 288 326 146 getpwuid.o
+ 63 0 4 67 43 getpwuid.o
- 34 0 320 354 162 getspent.o
+ 59 0 4 63 3f getspent.o
- 38 0 320 358 166 getspnam.o
+ 63 0 4 67 43 getspnam.o
- 38 0 320 358 166 sgetspent.o
+ 40 0 4 44 2c sgetspent.o
- 458 0 172 630 276 getnetent.o
+ 496 0 8 504 1f8 getnetent.o
- 45 0 480 525 20d gethostbyname.o
+ 66 0 4 70 46 gethostbyname.o
- 53 0 492 545 221 gethostbyaddr.o
+ 74 0 4 78 4e gethostbyaddr.o
- 49 0 492 541 21d gethostbyname2.o
+ 70 0 4 74 4a gethostbyname2.o
- 189 0 168 357 165 gethostent.o
+ 210 0 12 222 de gethostent.o
- 314 0 256 570 23a getpass.o
+ 343 0 4 347 15b getpass.o
- 4097 0 70240 74337 12261 des.o
+ 4391 0 8 4399 112f des.o
- 1921 0 160 2081 821 md5.o
+ 1857 0 4 1861 745 md5.o
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.patch
Type: text/x-diff
Size: 2940 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070721/1a90da13/attachment-0012.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.patch
Type: text/x-diff
Size: 5278 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070721/1a90da13/attachment-0013.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.patch
Type: text/x-diff
Size: 3710 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070721/1a90da13/attachment-0014.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4.patch
Type: text/x-diff
Size: 6946 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070721/1a90da13/attachment-0015.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5.patch
Type: text/x-diff
Size: 2011 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070721/1a90da13/attachment-0016.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6.patch
Type: text/x-diff
Size: 3666 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070721/1a90da13/attachment-0017.bin
More information about the uClibc
mailing list