sched/note: add note when mm add new region

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
xuxingliang
2024-07-03 13:28:42 +08:00
committed by Xiang Xiao
parent 0663ac1483
commit eac6a8597f
5 changed files with 25 additions and 4 deletions
+5
View File
@@ -600,6 +600,8 @@ void mm_addregion(FAR struct mm_heap_s *heap, FAR void *heapstart,
tlsf_add_pool(heap->mm_tlsf, heapstart, heapsize);
mm_unlock(heap);
sched_note_heap(NOTE_HEAP_ADD, heap, heapstart, heapsize);
}
/****************************************************************************
@@ -1439,6 +1441,9 @@ void mm_uninitialize(FAR struct mm_heap_s *heap)
for (i = 0; i < CONFIG_MM_REGIONS; i++)
{
kasan_unregister(heap->mm_heapstart[i]);
sched_note_heap(NOTE_HEAP_REMOVE, heap, heap->mm_heapstart[i],
(uintptr_t)heap->mm_heapend[i] -
(uintptr_t)heap->mm_heapstart[i]);
}
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)