This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: finding out what's taking space in .bss
- From: Andrew Lunn <andrew at lunn dot ch>
- To: heinricg at esiee dot fr
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 9 Feb 2004 11:33:29 +0100
- Subject: Re: [ECOS] finding out what's taking space in .bss
- References: <20040209095132.052713658DD@mail.esiee.fr>
On Mon, Feb 09, 2004 at 10:51:31AM +0100, heinricg@esiee.fr wrote:
> Hi all,
> I'm just sticking my nose into eCOS and I would like to build a very
> minimal version of it. In particular, I have very hard memory
> constraints and would like the eCOS kernel to use as little as a
> couple of KB. Of course I don't plan to do advanced debugging. I just
> want the bare essentials to run an RT application.
>
> I've added code for a new ARM platform and built it.
>
> At the moment, the arm-elf-size command reports 14224 bytes in the
> .bss section, which is way too much. Using the arm-elf-nm command, I
> can't seem to find out which symbols consume space in the bss section.
> The biggest one is called cygmem_pool_heap1, takes about 1KB and I
> can't find it in the code.
Thats a funny one. Take a look in your work tree. You will find
services/memalloc/common/current/heaps.cxx. This is an auto-generated
file which defines the heaps in your system. You seam to have a 1KB
heap. You need to ask yourself some questions. Do you need a heap? How
big a heap do you need? If you don't need a heap remove the memalloc
package all together.
> I'm sure I won't get 14224 bytes even if I add up all symbol sizes
> in the BSS section that are reported by nm.
> How reliable is this command?
Should be 100% reliable.
> I'm looking for advice on how to reduce RAM requirements, which
> packages usually take space, how to find out where objects that take
> space are located.
Starting with the minimal template is probably a good idea. Than add
any packages you do need.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss