mm: add memory pressure notification support

Add mm_heap_free interface to pass remaining memory to memory pressure

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2024-01-24 23:33:02 +08:00
committed by Xiang Xiao
parent f44a31c337
commit 49d1b4198f
10 changed files with 82 additions and 9 deletions

View File

@@ -66,6 +66,10 @@ FAR void *malloc(size_t size)
{
set_errno(ENOMEM);
}
else
{
mm_notify_pressure(mm_heapfree(USR_HEAP));
}
return ret;
#endif