- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
_Reen struct thread-local data is allocated at the top of the task’s stack. Therefore,
you need to make allowance when allocating memory for stacks. In general, the _reent structure consumes approximately 900 bytes of data for the normal C library, or 90 bytes for the reduced-footprint C library. How can I enable reduced-footprint C library?? I have try to check 'Small C Library' in system property setting, but after compiling project, the sizeof(struct _reent) still equals to 892 bytes. Anyone help? Because I'm not familiar with struct _reent. Another question is on which condition shall I base to decide whether enable 'Thread Safe C Library' or not? Thanks in advance, DavidLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David,
in your IDE click right mouse button and properties --> c/c++ build, tool settings --> general --> optimise size good luck Cheers and merry x-mass http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif Danny- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, danny
I have tried, but sizeof(struct _reent) still equals to 892 bytes. Anyone help? Thanks in advance David- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cann't recall if there is a "no reentrance" flag for it.
I am not sure if the default newlib is configured to configure.host.smallc. Maybe you should try another lib set, than the default newlib. Rebuild newlib with smallc or use uClibc. If you are using uC/OSII, you should not use default libs. You should use most of them of of the uC/OSII's lib. You can use -nostdinc and -nostdlib flags to select the includes and libs on gcc.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page