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.
1 parent 571095e commit f8c171dCopy full SHA for f8c171d
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