mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Merge branch 'master' into master
This commit is contained in:
commit
ae34caad19
@ -493,8 +493,9 @@ extern "C" void* ax_port_malloc(size_t size, const char* file, int line) {
|
|||||||
DEBUG_TLS_MEM_PRINT("%s:%d malloc %d failed, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
DEBUG_TLS_MEM_PRINT("%s:%d malloc %d failed, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
if (size >= 1024)
|
if (size >= 1024) {
|
||||||
DEBUG_TLS_MEM_PRINT("%s:%d malloc %d, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
DEBUG_TLS_MEM_PRINT("%s:%d malloc %d, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -510,8 +511,9 @@ extern "C" void* ax_port_realloc(void* ptr, size_t size, const char* file, int l
|
|||||||
DEBUG_TLS_MEM_PRINT("%s:%d realloc %d failed, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
DEBUG_TLS_MEM_PRINT("%s:%d realloc %d failed, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
if (size >= 1024)
|
if (size >= 1024) {
|
||||||
DEBUG_TLS_MEM_PRINT("%s:%d realloc %d, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
DEBUG_TLS_MEM_PRINT("%s:%d realloc %d, left %d\r\n", file, line, size, ESP.getFreeHeap());
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -519,6 +521,7 @@ extern "C" void ax_port_free(void* ptr) {
|
|||||||
free(ptr);
|
free(ptr);
|
||||||
uint32_t *p = (uint32_t*) ptr;
|
uint32_t *p = (uint32_t*) ptr;
|
||||||
size_t size = p[-3];
|
size_t size = p[-3];
|
||||||
if (size >= 1024)
|
if (size >= 1024) {
|
||||||
DEBUG_TLS_MEM_PRINT("free %d, left %d\r\n", p[-3], ESP.getFreeHeap());
|
DEBUG_TLS_MEM_PRINT("free %d, left %d\r\n", p[-3], ESP.getFreeHeap());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user