mirror of
https://github.com/apache/nuttx.git
synced 2025-12-13 23:17:11 +08:00
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:
@@ -66,6 +66,10 @@ FAR void *malloc(size_t size)
|
||||
{
|
||||
set_errno(ENOMEM);
|
||||
}
|
||||
else
|
||||
{
|
||||
mm_notify_pressure(mm_heapfree(USR_HEAP));
|
||||
}
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user