mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +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:
committed by
GitHub
parent
831e75d79e
commit
d96c8f393e
@ -23,7 +23,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user