Add MemoryUtil for Apple external.

This commit is contained in:
MAJigsaw77
2025-09-08 13:02:48 -04:00
committed by Eric
parent f3ff132e90
commit 7d714ecfeb
7 changed files with 48 additions and 4 deletions
+13
View File
@@ -0,0 +1,13 @@
#import "MemoryUtil.hpp"
#include <mach/mach.h>
size_t Apple_MemoryUtil_GetCurrentProcessRss()
{
task_basic_info info;
if (task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &TASK_BASIC_INFO_COUNT) != KERN_SUCCESS)
return 0;
return info.resident_size;
}