Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zephyr: alloc: virtual_heap_free: Panic on deallocations errors
Add k_panic() function call in error handling code to help detect potential memory release errors. The vmh_free function returns an error if: 1. heap belongs to another core, 2. given pointer to be freed is invalid (doesn't belong to the allocator), 3. there is an error in the code determining the size of the block to be freed 4. memory unmapping fails. Log entry is easy to miss, stopping the firmware at this point will draw attention to a critical problem related to memory allocation. Otherwise, it will have a slowly progressing memory leak. Signed-off-by: Adrian Warecki <[email protected]>
- Loading branch information