mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-23 01:58:24 +08:00
feat(heap): Link heap to IRAM
This commit is contained in:
@ -133,6 +133,8 @@ SECTIONS
|
|||||||
*libesp8266.a:ets_printf.o(.literal .text .literal.* .text.* .rodata.* .rodata)
|
*libesp8266.a:ets_printf.o(.literal .text .literal.* .text.* .rodata.* .rodata)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
*libheap.a:(.literal .text .literal.* .text.*)
|
||||||
|
|
||||||
_text_end = ABSOLUTE(.);
|
_text_end = ABSOLUTE(.);
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} >iram1_0_seg :iram1_0_phdr
|
} >iram1_0_seg :iram1_0_phdr
|
||||||
|
@ -272,7 +272,7 @@ static bool timer_delete_wrapper(void *timer, uint32_t ticks)
|
|||||||
return xTimerDelete(timer, ticks);
|
return xTimerDelete(timer, ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *malloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
|
static void IRAM_ATTR *malloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
|
||||||
{
|
{
|
||||||
uint32_t os_caps;
|
uint32_t os_caps;
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ static void *malloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t l
|
|||||||
return _heap_caps_malloc(s, os_caps, file, line);
|
return _heap_caps_malloc(s, os_caps, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *zalloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
|
static void IRAM_ATTR *zalloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t line)
|
||||||
{
|
{
|
||||||
uint32_t os_caps;
|
uint32_t os_caps;
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ static void *zalloc_wrapper(uint32_t s, uint32_t cap, const char *file, size_t l
|
|||||||
return _heap_caps_zalloc(s, os_caps, file, line);
|
return _heap_caps_zalloc(s, os_caps, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *realloc_wrapper(void *ptr, uint32_t s, uint32_t cap, const char *file, size_t line)
|
static void IRAM_ATTR *realloc_wrapper(void *ptr, uint32_t s, uint32_t cap, const char *file, size_t line)
|
||||||
{
|
{
|
||||||
uint32_t os_caps;
|
uint32_t os_caps;
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ static void *realloc_wrapper(void *ptr, uint32_t s, uint32_t cap, const char *fi
|
|||||||
return _heap_caps_realloc(ptr, s, os_caps, file, line);
|
return _heap_caps_realloc(ptr, s, os_caps, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *calloc_wrapper(uint32_t cnt, uint32_t s, uint32_t cap, const char *file, size_t line)
|
static void IRAM_ATTR *calloc_wrapper(uint32_t cnt, uint32_t s, uint32_t cap, const char *file, size_t line)
|
||||||
{
|
{
|
||||||
uint32_t os_caps;
|
uint32_t os_caps;
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ static void *calloc_wrapper(uint32_t cnt, uint32_t s, uint32_t cap, const char *
|
|||||||
return _heap_caps_calloc(cnt , s, os_caps, file, line);
|
return _heap_caps_calloc(cnt , s, os_caps, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_wrapper(void *ptr, const char *file, size_t line)
|
static void IRAM_ATTR free_wrapper(void *ptr, const char *file, size_t line)
|
||||||
{
|
{
|
||||||
_heap_caps_free(ptr, file, line);
|
_heap_caps_free(ptr, file, line);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user