• 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: Memory usage from PID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory usage from PID


  • Subject: Re: Memory usage from PID
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 16 Nov 2011 08:54:59 -0800

On Nov 16, 2011, at 8:45 AM, TomJones wrote:

> How would I go about getting an apps memory usage via a PID?

There’s a low-level API for getting info like this about processes. The standard response I’ve seen is “go to the darwin source archive and download the code for the top tool to see how to do it”.

Also, note that

(1) “Memory usage” is a really slippery term in a modern virtual-memory-based system. Are you talking about address space or physical RAM? Mapped or unmapped? Shared or exclusive? There are at least five different metrics related to memory and address space reported by top (RPRVT  RSHRD  RSIZE  VPRVT  VSIZE). You’re going to need to know what they mean and which of them are relevant to your needs.

(2) This is off-topic for cocoa-dev. Try darwin-userlevel instead if you have further questions.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Memory usage from PID
      • From: Don Quixote de la Mancha <email@hidden>
References: 
 >Memory usage from PID (From: TomJones <email@hidden>)

  • Prev by Date: Memory usage from PID
  • Next by Date: Re: About iVars declaration and property
  • Previous by thread: Memory usage from PID
  • Next by thread: Re: Memory usage from PID
  • Index(es):
    • Date
    • Thread