Posted By

iswear_wxp on 01/19/10


Tagged

rom


Versions (?)

系统内存


 / Published in: iPhone
 

  1. +(double)availableMemory{
  2. vm_statistics_data_t vmStats;
  3. mach_msg_type_number_t infoCount = HOST_VM_INFO_COUNT;
  4. kern_return_t kernReturn = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&vmStats, &infoCount);
  5.  
  6. if(kernReturn != KERN_SUCCESS)
  7. return NSNotFound;
  8.  
  9. return ((vm_page_size * vmStats.free_count) / 1024.0) / 1024.0;
  10. }

Report this snippet  

You need to login to post a comment.