mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
add aligned wraps for pvPortMalloc and pvPortRealloc
This commit is contained in:
parent
bcfdfb6b67
commit
f553467f64
@ -39,6 +39,16 @@
|
||||
#include "user_interface.h"
|
||||
#include "debug.h"
|
||||
|
||||
extern void *__real_pvPortMalloc(size_t xWantedSize, const char* file, int line);
|
||||
extern void *__wrap_pvPortMalloc(size_t xWantedSize, const char* file, int line){
|
||||
return __real_pvPortMalloc(((xWantedSize + 3) & ~((size_t)0x3)), file, line);
|
||||
}
|
||||
|
||||
extern void *__real_pvPortRealloc(void* ptr, size_t xWantedSize, const char* file, int line);
|
||||
extern void *__wrap_pvPortRealloc(void* ptr, size_t xWantedSize, const char* file, int line){
|
||||
return __real_pvPortRealloc(ptr, ((xWantedSize + 3) & ~((size_t)0x3)), file, line);
|
||||
}
|
||||
|
||||
void* ICACHE_RAM_ATTR malloc(size_t size) {
|
||||
size = ((size + 3) & ~((size_t)0x3));
|
||||
return os_malloc(size);
|
||||
|
@ -27,7 +27,7 @@ compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implici
|
||||
compiler.S.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
|
||||
|
||||
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy
|
||||
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy -Wl,-wrap,pvPortMalloc -Wl,-wrap,pvPortRealloc
|
||||
|
||||
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.c.elf.libs=-lm -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh
|
||||
|
Loading…
x
Reference in New Issue
Block a user