git.ithinksw.org
/
ITFoundation.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed the timeout from none to default timeout. Updated to use 10.2.8 SDK.
[ITFoundation.git]
/
ITVirtualMemoryInfo.m
diff --git
a/ITVirtualMemoryInfo.m
b/ITVirtualMemoryInfo.m
index
4017993
..
6d8e004
100755
(executable)
--- a/
ITVirtualMemoryInfo.m
+++ b/
ITVirtualMemoryInfo.m
@@
-1,7
+1,8
@@
#import "ITVirtualMemoryInfo.h"
#import "ITVirtualMemoryInfo.h"
+#import <unistd.h>
@interface ITVirtualMemoryInfo (Private)
@interface ITVirtualMemoryInfo (Private)
-- (BOOL)refreshStats;
+- (BOOL)refreshStats
:(struct vm_statistics *)myStat
;
@end
@implementation ITVirtualMemoryInfo
@end
@implementation ITVirtualMemoryInfo
@@
-18,14
+19,7
@@
- (int)pageSize
{
- (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
}
- (int)freePages
@@
-112,7
+106,7
@@
- (BOOL)refreshStats:(struct vm_statistics *)myStat
{
- (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);
mach_port_t myHost = mach_host_self();
int count = HOST_VM_INFO_COUNT;
NSLog(@"%i",count);