This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: data mem size estimation
- To: Suet Fei Li <suetfei at bwrc dot eecs dot berkeley dot edu>
- Subject: Re: [ECOS] data mem size estimation
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 01 Feb 2001 07:20:16 +0000
- Cc: "'ecos-discuss at sourceware dot cygnus dot com'" <ecos-discuss at sourceware dot cygnus dot com>
- Organization: Red Hat UK Ltd.
- References: <711F6B80B5B4D211BA900090272AB7649DB52C@noyce.eecs.berkeley.edu>
Suet Fei Li wrote:
>
> Hi everyone, is there a good way to estimate the data memory requirement for
> the OS? I need to know how much memory we need. Also any hints on how to
> estimate data memory requirement in general (application +OS) ? I have no
> experience in this at all.
If you aren't using dynamic memory allocation at all, the answer is easy:
arm-elf-size <executable>
Of course you may still want to reduce your statically defined stack sizes.
You can use the recently added stack usage measurement functions to
influence your choice - cyg_thread_measure_stack_usage() in the kernel C
API, or pthread_measure_stack_usage() in pthreads. The obvious caveats
apply that the measurements returned are not necessarily the worst case for
the code in question - that's a judgement call up to you.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine