Micorosoft Kinect Came to Windows on February 1
IOS & Android Development TroubleShooting
hi developers, Question about ios&andoird development ploblem please
Labels
android trouble shooting
(5)
IOS apps
(4)
IOS trouble shooting
(4)
3D Game Tutorial
(1)
inspiration
(1)
kinect
(1)
February 18, 2012
January 24, 2012
January 08, 2012
ios memory checking
void checkMemory()
{
mach_port_t host_port;
mach_msg_type_number_t host_size;
vm_size_t pagesize;
host_port = mach_host_self();
host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t);
host_page_size(host_port, &pagesize);
vm_statistics_data_t vm_stat;
if (host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size) != KERN_SUCCESS)
NSLog(@"Failed to fetch vm statistics");
natural_t mem_real = NSRealMemoryAvailable();
natural_t mem_free = vm_stat.free_count * pagesize;
natural_t mem_used = (vm_stat.active_count +
vm_stat.inactive_count +
vm_stat.wire_count) * pagesize;
natural_t mem_total = mem_used + mem_free;
printf("\n");
printf("** MEMORY **\n");
printf("Real : %03u,%03u,%03u %3umb\n",mem_real/1000/1000, mem_real/1000%1000, mem_real%1000, mem_real/1024/1024 );
printf("Total: %03u,%03u,%03u %3umb\n",mem_total/1000/1000,mem_total/1000%1000,mem_total%1000,mem_total/1024/1024);
printf("Free : %03u,%03u,%03u %3umb\n",mem_free/1000/1000, mem_free/1000%1000, mem_free%1000, mem_free/1024/1024 );
printf("Used : %03u,%03u,%03u %3umb\n",mem_used/1000/1000, mem_used/1000%1000, mem_used%1000, mem_used/1024/1024 );
printf("\n");
}
Subject :
IOS trouble shooting
Subscribe to:
Posts (Atom)