mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Move some exception strings to PROGMEM (#5050)
The memory allocation failure message was accidentally stored in RAM and not in PROGMEM. panic() did not place the __FILE__ string in PROGMEM, either. Move both to PROGMEM, save ~64 bytes of heap (depends on size of path of the Arduino core library).
This commit is contained in:
parent
831e75d79e
commit
d96c8f393e
@ -166,7 +166,7 @@ void __wrap_system_restart_local() {
|
|||||||
|
|
||||||
// Use cap-X formatting to ensure the standard EspExceptionDecoder doesn't match the address
|
// Use cap-X formatting to ensure the standard EspExceptionDecoder doesn't match the address
|
||||||
if (umm_last_fail_alloc_addr) {
|
if (umm_last_fail_alloc_addr) {
|
||||||
ets_printf("\nlast failed alloc call: %08X(%d)\n", (uint32_t)umm_last_fail_alloc_addr, umm_last_fail_alloc_size);
|
ets_printf_P("\nlast failed alloc call: %08X(%d)\n", (uint32_t)umm_last_fail_alloc_addr, umm_last_fail_alloc_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
custom_crash_callback( &rst_info, sp + offset, stack_end );
|
custom_crash_callback( &rst_info, sp + offset, stack_end );
|
||||||
|
@ -23,7 +23,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void __panic_func(const char* file, int line, const char* func) __attribute__((noreturn));
|
void __panic_func(const char* file, int line, const char* func) __attribute__((noreturn));
|
||||||
#define panic() __panic_func(__FILE__, __LINE__, __func__)
|
#define panic() __panic_func(PSTR(__FILE__), __LINE__, __func__)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user