X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/a38dee0c58dae0d276ab663eddf7124c2ce9acc5..3941e1bf85cdad02f5f7825d61cbbded49d035fe:/ITVirtualMemoryInfo.m diff --git a/ITVirtualMemoryInfo.m b/ITVirtualMemoryInfo.m index 4017993..3c6a96a 100755 --- a/ITVirtualMemoryInfo.m +++ b/ITVirtualMemoryInfo.m @@ -1,7 +1,8 @@ #import "ITVirtualMemoryInfo.h" +#import @interface ITVirtualMemoryInfo (Private) -- (BOOL)refreshStats; +- (BOOL)refreshStats:(struct vm_statistics *)myStat; @end @implementation ITVirtualMemoryInfo @@ -18,14 +19,7 @@ - (int)pageSize { - int pageSize = 0; - - if ( host_page_size(mach_host_self(), &pageSize) != KERN_SUCCESS ) { - NSLog(@"Failed to get page size, defaulting to 4096/4k"); - pageSize = DEFAULT_PAGE_SIZE; - } - - return pageSize; + return getpagesize(); } - (int)freePages