memory footprint

Aaron J. Grier aaron at
Tue Nov 26 19:13:04 UTC 2002

On Tue, Nov 26, 2002 at 12:15:45PM -0500, Wulf Hofbauer wrote:

> Well, I get about the same codesize for a null application...

this got me wondering...

(m68k, custom BSP, RTEMS 4.5.0, gcc 3.2.1)

> I was under the impression only those managers referenced in the
> code get linked.

the "minimum" example has all the managers enabled, so there's some
space right there...

> So the RTEMS philosophy is "start big, cut out what you don't need"
> instead of "start minimal, add only what you need"? Or am I getting
> this wrong again?

I think it depends primarily on who put the scripts (condefs and
Makefile options) together.  ;)  certainly the hooks are there to tune

> > Out of interest what would seem right to you ?
> For a "null" program that doesn't use the C library or the RTEMS API,
> I think 32 kB would be acceptable, 16 kB would be reasonable, 8 kB
> would be good, and 4 kB would be excellent.

here's what I was able to do by setting MANAGERS = none and compiling
RTEMS with -DNDEBUG and -O4 -fomit-frame-pointer to avoid calls to
printf from assert().

   text    data     bss     dec     hex filename
  35144    2656    7592   45392    b150 o-optimize/minimum.exe

by disabling the console and termios, I was able to get it down to

  32992    2656    7592   43240    a8e8 o-optimize/minimum.rxe

> Part of the problem is, on m68k, that there's a block of 9 kb of
> uninitialized data space embedded in the code section.


> Still, even without that, the executable looks too large to me.

certainly worth some investigation.

  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron at

More information about the users mailing list