[BusyBox] Using memory in daemons process

Rob Landley rob at landley.net
Wed Apr 27 07:44:10 UTC 2005


On Wednesday 27 April 2005 01:21 am, JBS wrote:
> I have a uClinux kernel running in a Coldfire processor. And, yes,
> this an no-MMU system.
>
> I am using flat programs (not ELF) to run in my platform, and I obtain
> .gdb to debug.
>
> If I run: m68k-elf-nm --size-sort busybox.gdb
>
> I have:
>
> ...... (a lot of small memory data)
>
> 000009f2 T _fpmaxtostr
> 00000a76 t colon
> 00000d02 T nfsmount
> 00001000 b comp_maskl
> 00001000 b comp_maskr
> 00001000 b key_perm_maskl
> 00001000 b key_perm_maskr
> 00001000 b lfile
> 00001000 b psbox
> 0000152a t do_cmd
> 00002000 b fp_maskl
> 00002000 b fp_maskr
> 00002000 b ip_maskl
> 00002000 b ip_maskr
> 00004000 b m_sbox
>
> I suppose that the last data is the largest block memory I need. Whe I
> run, for example syslogd I obtain in this case 384K but if I remove
> applets I can run with only 41K. So, I made the question.

Huh.  I haven't got m_sbox or ip_mask anything.  My largest symbols are:

00000fd4 t process_dev
00001000 b lfile
00001000 B outbuf
000012a4 t do_cmd
00001351 t identify
00002000 b disklabelbuffer
00002000 b logname.2
00002000 b mycommand.3
00002000 b pass.0
00002000 b readbuffer
00002000 b the_command.1
00002001 b basebuf
00004000 b buffer.0
00008000 B status_hashtable
00009c60 B package_hashtable
0000c442 R usage_messages
0000fff8 B name_hashtable
00040000 B codetab
00080000 B htab

Interestingly, both htab and codetab are symbols from gunzip 
(archival/libunarchive/decompress_uncompress.c) that really really really 
should be dynamically allocated.  (Cleaning that puppy up has been on my 
to-do list for some time...)

name_hashtable is from dpkg, which I really don't care about because I only 
ever build it when doing a "make allyesconfig" test like this.

usage_messages is actually used, it's all them help strings.  Possibly there's 
some way to compress it, though.

package_hashtable is dkpg again.  I don't use it, and don't care about it.  
Same for status_hashtable.

buffer.0 is harder to pin down with just grep, it could be 
networking/udhcp/files.c, or networking/netstat.c, or networking/inetd.c...

What version of busybox are you using?

Rob



More information about the busybox mailing list