Sub UsedMemory As Long
Dim no As NativeObject = Me
Return no.RunMethod("usedMemory", Null).AsNumber
End Sub
#if OBJC
#import "mach/mach.h"
- (vm_size_t) usedMemory {
struct task_basic_info info;
mach_msg_type_number_t size = sizeof(info);
kern_return_t kerr = task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &size);
return (kerr == KERN_SUCCESS) ? info.resident_size : 0; // size in bytes
}
#end if
to "find the used memory size".
2 questions:
I assume this means the total memory used by the app.
Is there any code that can return the maximum memory the app can use?