mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-02 02:10:19 +08:00
feat(esp8266): Don't use ICACHE_RODATA_ATTR to let string to be in flash
rodata will be in flash by default.
This commit is contained in:
@ -113,48 +113,42 @@ bool ICACHE_FLASH_ATTR check_memleak_debug_enable(void)
|
||||
#ifndef os_free
|
||||
#define os_free(s) \
|
||||
do{\
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
vPortFree_trace(s, mem_debug_file, __LINE__);\
|
||||
vPortFree_trace(s, __FILE__, __LINE__);\
|
||||
}while(0)
|
||||
#endif
|
||||
|
||||
#ifndef os_malloc
|
||||
#define os_malloc(s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortMalloc_trace(s, mem_debug_file, __LINE__, false); \
|
||||
pvPortMalloc_trace(s, __FILE__, __LINE__, false); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef os_malloc_iram
|
||||
#define os_malloc_iram(s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortMalloc_trace(s, mem_debug_file, __LINE__, true); \
|
||||
pvPortMalloc_trace(s, __FILE__, __LINE__, true); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef os_calloc
|
||||
#define os_calloc(p, s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortCalloc_trace(p, s, mem_debug_file, __LINE__); \
|
||||
pvPortCalloc_trace(p, s, __FILE__, __LINE__); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef os_realloc
|
||||
#define os_realloc(p, s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortRealloc_trace(p, s, mem_debug_file, __LINE__); \
|
||||
pvPortRealloc_trace(p, s, __FILE__, __LINE__); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef os_zalloc
|
||||
#define os_zalloc(s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortZalloc_trace(s, mem_debug_file, __LINE__); \
|
||||
pvPortZalloc_trace(s, __FILE__, __LINE__); \
|
||||
})
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user