mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-26 05:54:46 -07:00
Moar memory management crashes.
This commit is contained in:
@@ -81,6 +81,10 @@ void furi_hal_memory_init() {
|
||||
}
|
||||
|
||||
void* furi_hal_memory_alloc(size_t size) {
|
||||
if(FURI_IS_ISR()) {
|
||||
furi_crash("memmgt in ISR");
|
||||
}
|
||||
|
||||
if(furi_hal_memory == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ void* pvPortMalloc(size_t xWantedSize) {
|
||||
size_t to_wipe = xWantedSize;
|
||||
|
||||
if(FURI_IS_ISR()) {
|
||||
furi_crash("malloc in ISR");
|
||||
furi_crash("memmgt in ISR");
|
||||
}
|
||||
|
||||
#ifdef HEAP_PRINT_DEBUG
|
||||
@@ -490,6 +490,10 @@ void vPortFree(void* pv) {
|
||||
uint8_t* puc = (uint8_t*)pv;
|
||||
BlockLink_t* pxLink;
|
||||
|
||||
if(FURI_IS_ISR()) {
|
||||
furi_crash("memmgt in ISR");
|
||||
}
|
||||
|
||||
if(pv != NULL) {
|
||||
/* The memory being freed will have an BlockLink_t structure immediately
|
||||
before it. */
|
||||
|
||||
Reference in New Issue
Block a user