add heap_caps_get_size_free

This commit is contained in:
zhanghu
2019-10-16 16:30:42 +08:00
parent 65940cc0da
commit 341ef5e8b2
2 changed files with 20 additions and 0 deletions

View File

@@ -450,3 +450,10 @@ void heap_caps_dump_all(void)
{
heap_caps_dump(MALLOC_CAP_INVALID);
}
size_t heap_caps_get_allocated_size( void *ptr )
{
heap_t *heap = find_containing_heap(ptr);
size_t size = multi_heap_get_allocated_size(heap->heap, ptr);
return size;
}