mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 18:27:56 +08:00
mm_mallinfo: do heap end debug assert check with heap semaphore held
This commit is contained in:
committed by
Gregory Nutt
parent
027a446158
commit
81b5118727
@@ -109,10 +109,12 @@ int mm_mallinfo(FAR struct mm_heap_s *heap, FAR struct mallinfo *info)
|
||||
}
|
||||
}
|
||||
|
||||
minfo("region=%d node=%p heapend=%p\n",
|
||||
region, node, heap->mm_heapend[region]);
|
||||
DEBUGASSERT(node == heap->mm_heapend[region]);
|
||||
|
||||
mm_givesemaphore(heap);
|
||||
|
||||
minfo("region=%d node=%p heapend=%p\n", region, node, heap->mm_heapend[region]);
|
||||
DEBUGASSERT(node == heap->mm_heapend[region]);
|
||||
uordblks += SIZEOF_MM_ALLOCNODE; /* account for the tail node */
|
||||
}
|
||||
#undef region
|
||||
|
||||
Reference in New Issue
Block a user