You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In _psutil_osx.c get_process_memory_maps() (see #260) the file names are off by one line.
I think the proc_regionfilename() should be called with the base address of a
region, not with address+size:
https://code.google.com/p/psutil/source/browse/psutil/_psutil_osx.c?spec=svn578700e9906f2e92ef76a56dabf3ed7d7a9740c2&r=578700e9906f2e92ef76a56dabf3ed7d7a9740c2#346
This is OS X 10.7 (Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012;
root:xnu-1699.32.7~1/RELEASE_X86_64):
$ sudo python examples/pmap.py 60271
00000000033a1000 4K r--/rwx [prv]
0000000003400000 12K rw-/rwx /Users/...
0000000003500000 100000K r--/r-x /Users/...
$ vmmap -v 60271
MALLOC metadata 00000001033a1000-00000001033a2000 [ 4K 4K 4K]
r--/rwx SM=COW
MALLOC_TINY 0000000103400000-0000000103500000 [ 1024K 12K 12K]
rw-/rwx SM=COW DefaultMallocZone_0x103371000
mapped file 0000000103500000-00000001096a8000 [ 97.7M 97.7M 0K]
r--/r-x SM=S/A /Users/...
Thanks for the report looks like that may be correct... arguments to
proc_regionfilename() should be
proc_regionfilename(
int pid,
uint64_t address,
void *buffer,
uint32_t buffersize
);
I think the address += size is meant to be incrementing to the next memory map
but it's happening before the first call to proc_regionfilename() and throwing
everything off by one.
From asqueella on June 18, 2013 01:11:25
Original issue: http://code.google.com/p/psutil/issues/detail?id=394
The text was updated successfully, but these errors were encountered: