#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
- (BOOL)refreshStats:(struct vm_statistics *)myStat
{
- bzero(&myStat,sizeof(myStat));
+ bzero(myStat,sizeof(myStat));
mach_port_t myHost = mach_host_self();
int count = HOST_VM_INFO_COUNT;
NSLog(@"%i",count);