Add MemoryUtil for Apple external.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user