mm: add mm_largest api to get the current largest available memory block

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2024-06-30 16:10:22 +08:00
committed by Xiang Xiao
parent 2cdfda149a
commit 84333881d7
4 changed files with 52 additions and 0 deletions
+13
View File
@@ -1476,3 +1476,16 @@ size_t mm_heapfree(FAR struct mm_heap_s *heap)
{
return heap->mm_heapsize - heap->mm_curused;
}
/****************************************************************************
* Name: mm_heapfree_largest
*
* Description:
* Return the largest chunk of contiguous memory in the heap
*
****************************************************************************/
size_t mm_heapfree_largest(FAR struct mm_heap_s *heap)
{
return SIZE_MAX;
}