• 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
Info about memory objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Info about memory objects


  • Subject: Info about memory objects
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 14 Apr 2012 17:31:14 +0700

Given an obj_id (as returned by mach_vm_region(VM_REGION_TOP_INFO)
 is it possible to get some information about this memory object, like: what kind? mapping a file? if yes, what file? etc. ?


A somehow related question:
The memory_object_offset_t offset as returned by mach_vm_region(VM_REGION_BASIC_INFO)
is often somewhat unexpected.

E.g.: TextEdit has the following load commands:
 path: "/Applications/TextEdit.app/Contents/MacOS/TextEdit"
  FAT_CIGAM with 2 headers:
  header[0]: Intel-64  -- selected
  header[1]: Intel-x86 -- ignored
  do 21 load commands:
  lc[0]: LC_SEGMENT_64 __PAGEZERO file        0 +        0 →        0 +        0
  lc[1]: LC_SEGMENT_64     __TEXT file        0 +  0x1e000 →        0 +  0x1e000
  lc[2]: LC_SEGMENT_64     __DATA file  0x1e000 +   0x7000 →  0x1e000 +   0x7000
  lc[3]: LC_SEGMENT_64 __LINKEDIT file  0x25000 +   0x56e0 →  0x25000 +   0x6000

But the offsets from mach_vm_region() are 0x1000, 0, 0x26000. That is: shifted by one page and the offset of __DATA is zero.

Why?


Kind regards,

Gerriet.


 _______________________________________________
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


  • Prev by Date: Re: is mach_vm_region confused or am I?
  • Next by Date: Re: mach_vm_region vs. vm_region_64
  • Previous by thread: Re: is mach_vm_region confused or am I?
  • Next by thread: How to get nbr of resident pages
  • Index(es):
    • Date
    • Thread