diff --git a/cafe/coreinit/exports.def b/cafe/coreinit/exports.def index dd1aa20..c76530d 100644 --- a/cafe/coreinit/exports.def +++ b/cafe/coreinit/exports.def @@ -129,6 +129,7 @@ MEMGetGroupIDForExpHeap MEMGetSizeForMBlockExpHeap MEMGetGroupIDForMBlockExpHeap MEMGetAllocDirForMBlockExpHeap +MEMVisitAllocatedForExpHeap // coreinit/fastcondition.h OSFastCond_Init diff --git a/include/coreinit/memexpheap.h b/include/coreinit/memexpheap.h index d8cb077..5323f6e 100644 --- a/include/coreinit/memexpheap.h +++ b/include/coreinit/memexpheap.h @@ -16,6 +16,9 @@ typedef struct MEMExpHeap MEMExpHeap; typedef struct MEMExpHeapBlock MEMExpHeapBlock; typedef struct MEMExpHeapBlockList MEMExpHeapBlockList; +typedef void (*MEMExpHeapBlockVisitor)(void *block, MEMHeapHandle heap, + void *context); + typedef enum MEMExpHeapMode { MEM_EXP_HEAP_MODE_FIRST_FREE = 0, @@ -123,6 +126,11 @@ MEMGetGroupIDForMBlockExpHeap(void *block); MEMExpHeapDirection MEMGetAllocDirForMBlockExpHeap(void *block); +void +MEMVisitAllocatedForExpHeap(MEMHeapHandle heap, + MEMExpHeapBlockVisitor callback, + void *context); + #ifdef __cplusplus } #endif