[patch] ARM semihosted heap limits
Paul Brook
paul@codesourcery.com
Fri Apr 6 01:21:00 GMT 2007
The ARM semihosting syscalls (as used by the default arm-none-eabi newlib
configuration) provide a mechanism for the host to inform the program of the
heap memory area.
Currently newlib ignores these, and uses the area between the end of the data
segment and the stack.
The patch below makes the _sbrk implementation honour these values, and
gracefully fall back to the old behaviour is they are not
available/specified.
Tested on arm-none-eabi with a variety of semihosting implementations.
Ok?
Paul
2007-04-05 Paul Brook <paul@codesourcery.com>
libgloss/
* arm/crt0.S: Define __heap_base__ and __heap_limit__.
* arm/syscalls.c (_sbrk): Use them.
newlib/
* libc/sys/arm/crt0.S: Define __heap_base__ and __heap_limit__.
* libc/sys/arm/syscalls.c (_sbrk): Use them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.newlib_heaplimit_fsf
Type: text/x-diff
Size: 4780 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20070406/8aa4b89f/attachment.bin>
More information about the Newlib
mailing list