Re: vmmap source?
Re: vmmap source?
- Subject: Re: vmmap source?
- From: Quinn <email@hidden>
- Date: Tue, 12 Jun 2007 08:04:56 -0700
Title: Re: vmmap source?
At 17:03 -0700 11/6/07, Yount, Chuck wrote:
Alternatively, does
anyone have some sample code that enumerates the virtual memory
regions for a process?
You typically do this using the Mach APIs vm_region and
mach_vm_region. They are pretty straightforward to use.
However, getting exactly the same results as vmmap is a
challenge, because it does all sorts of clever low-level things that
aren't going to be compatible from release-to-release. So, if
you're just doing a debugging tool, feel free to play around with
these APIs. OTOH, if this is code that's going to end up on end
users systems, Terry suggestion of popen'ing vmmap is probably a
better idea.
S+E
--
Quinn "The
Eskimo!"
<http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core
OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden