Code- and heap- size

Jan.Suchotzki at de.abb.com Jan.Suchotzki at de.abb.com
Thu Oct 4 15:58:22 UTC 2001


Hi,

while I´m now able to get all the information about used resources
(thanks again for the answers), I have a new porblem.

I was wondering where RTEMS allocates the memory for normal
variables, arrays etc. A short example that I´ve written for this
problem:

... Init(...) {
    unsigned char test[1024];

    for (int i=0; i< 1024; i++)
       test[i] = 'A';
}

I check the codesize with m68k-rtems-size (target == m68k-efi332)
and get information about workspace and heap size with Heap_get_information
and rtems_region_get_information.

The difference between the Init-function above and the same Init-function
without
the array and for-statement is 80 byte. When switching from application
without
to application with (array and ...) the codesize is +80 byte and the
complete heap
is -80 byte.

Can someone explain me this behaviour?

Thanks a lot!!!

Jan Suchotzki




More information about the users mailing list