Moar memory management crashes.

This commit is contained in:
SG
2022-11-15 23:58:36 +10:00
parent 2198a38a22
commit c832ad6d1f
2 changed files with 9 additions and 1 deletions

View File

@@ -81,6 +81,10 @@ void furi_hal_memory_init() {
} }
void* furi_hal_memory_alloc(size_t size) { void* furi_hal_memory_alloc(size_t size) {
if(FURI_IS_ISR()) {
furi_crash("memmgt in ISR");
}
if(furi_hal_memory == NULL) { if(furi_hal_memory == NULL) {
return NULL; return NULL;
} }

View File

@@ -341,7 +341,7 @@ void* pvPortMalloc(size_t xWantedSize) {
size_t to_wipe = xWantedSize; size_t to_wipe = xWantedSize;
if(FURI_IS_ISR()) { if(FURI_IS_ISR()) {
furi_crash("malloc in ISR"); furi_crash("memmgt in ISR");
} }
#ifdef HEAP_PRINT_DEBUG #ifdef HEAP_PRINT_DEBUG
@@ -490,6 +490,10 @@ void vPortFree(void* pv) {
uint8_t* puc = (uint8_t*)pv; uint8_t* puc = (uint8_t*)pv;
BlockLink_t* pxLink; BlockLink_t* pxLink;
if(FURI_IS_ISR()) {
furi_crash("memmgt in ISR");
}
if(pv != NULL) { if(pv != NULL) {
/* The memory being freed will have an BlockLink_t structure immediately /* The memory being freed will have an BlockLink_t structure immediately
before it. */ before it. */