mirror of https://github.com/ARMmbed/mbed-os.git
Call to specific _wrap_sbrk to support 2 region model for heap and stack
parent
636ced8ed0
commit
0efc876bb4
|
@ -1053,12 +1053,13 @@ extern "C" uint32_t __HeapLimit;
|
|||
extern "C" int errno;
|
||||
|
||||
// Dynamic memory allocation related syscall.
|
||||
#if defined(TARGET_NUVOTON)
|
||||
#if (defined(TARGET_NUVOTON) || defined(TWO_RAM_REGIONS))
|
||||
|
||||
// Overwrite _sbrk() to support two region model (heap and stack are two distinct regions).
|
||||
// __wrap__sbrk() is implemented in:
|
||||
// TARGET_NUMAKER_PFM_NUC472 targets/TARGET_NUVOTON/TARGET_NUC472/TARGET_NUMAKER_PFM_NUC472/TOOLCHAIN_GCC_ARM/nuc472_retarget.c
|
||||
// TARGET_NUMAKER_PFM_M453 targets/TARGET_NUVOTON/TARGET_M451/TARGET_NUMAKER_PFM_M453/TOOLCHAIN_GCC_ARM/m451_retarget.c
|
||||
// TARGET_STM32L4 targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4/l4_retarget.c
|
||||
extern "C" void *__wrap__sbrk(int incr);
|
||||
extern "C" caddr_t _sbrk(int incr) {
|
||||
return (caddr_t) __wrap__sbrk(incr);
|
||||
|
|
Loading…
Reference in New Issue