mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-16 03:06:37 +08:00
feat(heap): Link heap raw malloc/free from flash to iram
Remove raw malloc internal calling function.
This commit is contained in:
@ -42,8 +42,9 @@
|
||||
#endif
|
||||
|
||||
static const char *TAG = "heap_trace";
|
||||
static int s_heap_trace_mode = HEAP_TRACE_NONE;
|
||||
|
||||
extern heap_region_t g_heap_region[HEAP_REGIONS_MAX];
|
||||
extern int __g_heap_trace_mode;
|
||||
|
||||
/**
|
||||
* @brief Empty function just for passing compiling some place.
|
||||
@ -58,7 +59,7 @@ esp_err_t heap_trace_init_standalone(heap_trace_record_t *record_buffer, size_t
|
||||
*/
|
||||
int heap_trace_is_on(void)
|
||||
{
|
||||
return s_heap_trace_mode == HEAP_TRACE_LEAKS;
|
||||
return __g_heap_trace_mode == HEAP_TRACE_LEAKS;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -66,7 +67,7 @@ int heap_trace_is_on(void)
|
||||
*/
|
||||
esp_err_t heap_trace_start(heap_trace_mode_t mode)
|
||||
{
|
||||
s_heap_trace_mode = mode;
|
||||
__g_heap_trace_mode = mode;
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
@ -76,7 +77,7 @@ esp_err_t heap_trace_start(heap_trace_mode_t mode)
|
||||
*/
|
||||
esp_err_t heap_trace_stop(void)
|
||||
{
|
||||
s_heap_trace_mode = HEAP_TRACE_NONE;
|
||||
__g_heap_trace_mode = HEAP_TRACE_NONE;
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
@ -86,7 +87,7 @@ esp_err_t heap_trace_stop(void)
|
||||
*/
|
||||
esp_err_t heap_trace_resume(void)
|
||||
{
|
||||
s_heap_trace_mode = HEAP_TRACE_LEAKS;
|
||||
__g_heap_trace_mode = HEAP_TRACE_LEAKS;
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user