Artem B. Bityuckiy
Mon Feb 9 21:50:00 GMT 2004

Sergei Organov wrote:
> "Artem B. Bityuckiy" <> writes:
>>Can anybody give me a hint how to get Heap size *when using Newlib*. There is
>>no such POSIX call. I need some hack to be shure that my program doesn't eat
> I guess malloc_stats()/mallinfo() could help.
I receive:

newlib/libc/stdlib/mstats.c:117: undefined reference to `_malloc_stats_r'
newlib/libc/stdlib/mstats.c:145: undefined reference to `_malloc_stats_r'

It seems _malloc_stats_r should be provided by system. But I use pure 
arm-elf-gdb's simulator. Is there some way to provide _malloc_stats_r 
when using simulator with no any underlying OS?

Are there any other approaches to get Heap size exist?

Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

More information about the Newlib mailing list