#import "ITVirtualMemoryInfo.h"
+#import <unistd.h>
@interface ITVirtualMemoryInfo (Private)
- (BOOL)refreshStats:(struct vm_statistics *)myStat;
- (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