REENT_SMALL
Raphael Derosso Pereira
raphaelpereira@gmail.com
Mon Dec 1 07:14:00 GMT 2008
Jeff,
Thanks. Sorry for not doing the 'sizeof', but I'm in the middle of
finding a problem here and can't compile right now, so it would be
easier to ask as I imagined that someone already know that size.
I'm building a small posix system on top of FreeRTOS and newlib for a
LPC2387 system. As I have about 64kb of RAM (ignoring the USB and
Ethernet RAM), I will use the small structure.
I'm having some problems with GCC 4.3.2. The problema seems to be on
stressing 'new SomeClass' followed by a 'delete SomeClass'. Sometimes
the SP register gets zeroed after a call to
___Unwind_SjLj_Unregister_from_arm or _Unwind_SjLj_Unregister.
I'm trying to use GCC 4.2.4 now to see if the problem remains.
Best Regards and Thanks,
2008/11/27 Jeff Johnston <jjohnstn@redhat.com>:
> Raphael Derosso Pereira wrote:
>>
>> Hello,
>>
>> I would like to know what is the size difference between the normal
>> reent structure and the small reent structure?
>>
>> Best Regards,
>>
>> --
>> Raphael Derosso Pereira
>> Engenheiro de Computação
>> icq: 4517421
>> msn: rderossopereira@hotmail.com
>> Skype: rderossopereira
>>
>
> To figure it out, just print sizeof(struct _reent) with one of the standard
> headers included. Then do it again with #define _REENT_SMALL defined at
> the top.
>
> The normal reent structure is currently 1120 bytes and the small version is
> 240 bytes to start.
> The _REENT_SMALL version grows dynamically as features are used and due to
> this there is often an
> extra level of indirection accessing fields. It really is meant for
> extremely small platforms with little memory to spare.
>
> -- Jeff J.
>
--
Raphael Derosso Pereira
Engenheiro de Computação
icq: 4517421
msn: rderossopereira@hotmail.com
Skype: rderossopereira
More information about the Newlib
mailing list