This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: data mem size estimation


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]