• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: querying the system for RAM usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: querying the system for RAM usage


  • Subject: Re: querying the system for RAM usage
  • From: Cameron Hayne <email@hidden>
  • Date: Sat, 25 Jun 2005 23:53:03 -0400


On 25-Jun-05, at 11:05 PM, Brian Bergstrand wrote:


On Jun 25, 2005, at 5:49 PM, nick briggs wrote:

I am to querying the system for RAM usage by creating a NSTask to 'top' and parsing the output, are we aware of a more elegant solution / API?


#import <mach/host_info.h> #import <mach/mach_host.h> #import <mach/host_priv.h>

vm_statistics_data_t page_info;
mach_msg_type_number_t count;
count = HOST_VM_INFO_COUNT;
kern_return_t kret = host_statistics (mach_host_self(), HOST_VM_INFO, (host_info_t)&page_info, &count);




You can see an example of doing this in my "VMTester" project:
http://hayne.net/MacDev/VMTester/

--
Cameron Hayne
email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Services Menu? Deprecated?
      • From: Gen Kiyooka <email@hidden>
References: 
 >querying the system for RAM usage (From: nick briggs <email@hidden>)
 >Re: querying the system for RAM usage (From: Brian Bergstrand <email@hidden>)

  • Prev by Date: Re: Printing multiple columns
  • Next by Date: Services Menu? Deprecated?
  • Previous by thread: Re: querying the system for RAM usage
  • Next by thread: Services Menu? Deprecated?
  • Index(es):
    • Date
    • Thread