[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Static memory footprint analysis
- Date: Tue, 10 Mar 2009 11:15:58 +1100
- From: chrisj at rtems.org (Chris Johns)
- Subject: Static memory footprint analysis
Ingolf Steinbach wrote:
>
> is it possible to calculate the memory footprint of an RTEMS/sparc
> application (which does NOT use dynamic memory allocation like
> malloc()) by just analyzing the ELF file? Something like:
>
> % sparc-rtems-objdump --headers application.exe |
> sum_size_column_for_ALLOC_sections
> % sparc-rtems-gdb application.exe
> (gdb) print Configuration.work_space_size
>
> and then add the outputs. Which memory consuming components are not
> covered by this (i.e. is there more than ALLOC sections and RTEMS
> workspace)?
>
The libc, networking or other services could be calling malloc. For example
printf will cause stdout to allocate a buffer.
> (RTEMS-4.6.5 solution preferred)
Newer versions of RTEMS have heap reporting functions that help here.
> Kind regards
> Ingolf
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users