diff --git a/mm/mm_heap/mm_extend.c b/mm/mm_heap/mm_extend.c index 9ffc7e74cbb..8ff2ddec0b7 100644 --- a/mm/mm_heap/mm_extend.c +++ b/mm/mm_heap/mm_extend.c @@ -106,6 +106,10 @@ void mm_extend(FAR struct mm_heap_s *heap, FAR void *mem, size_t size, newnode->preceding = oldnode->size | MM_ALLOC_BIT; heap->mm_heapend[region] = newnode; + + /* Finally, increase the total heap size accordingly */ + + heap->mm_heapsize += size; mm_unlock(heap); /* Finally "free" the new block of memory where the old terminal node was