Furi: Add "out of memory" and "malloc(0)" crash messages (#3574)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
WillyJL 2024-04-07 14:49:00 +01:00 committed by GitHub
parent c31b60c7b7
commit 6b120a3b09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -486,7 +486,7 @@ void* pvPortMalloc(size_t xWantedSize) {
configASSERT((((size_t)pvReturn) & (size_t)portBYTE_ALIGNMENT_MASK) == 0); configASSERT((((size_t)pvReturn) & (size_t)portBYTE_ALIGNMENT_MASK) == 0);
furi_check(pvReturn); furi_check(pvReturn, xWantedSize ? "out of memory" : "malloc(0)");
pvReturn = memset(pvReturn, 0, to_wipe); pvReturn = memset(pvReturn, 0, to_wipe);
return pvReturn; return pvReturn;
} }