We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 571095e + f8c171d commit 2475568Copy full SHA for 2475568
src/memheap.c
@@ -517,6 +517,8 @@ void rt_memheap_free(void *ptr)
517
518
/* check magic */
519
RT_ASSERT((header_ptr->magic & RT_MEMHEAP_MASK) == RT_MEMHEAP_MAGIC);
520
+ /* check whether this block of memory has been over-written. */
521
+ RT_ASSERT((header_ptr->next->magic & RT_MEMHEAP_MASK) == RT_MEMHEAP_MAGIC);
522
523
/* get pool ptr */
524
heap = header_ptr->pool_ptr;
0 commit comments