Comment #24 on issue 9653 by viettrungluu: about:memory doesn't work on Linux/OS X http://code.google.com/p/chromium/issues/detail?id=9653
(Mostly for my own reference....) On Mac, getting process information seems to be a case of picking your poison: - the kern.proc sysctl (see sysctl(3)) doesn't provide much information (leaving many fields of the kinfo_proc structure zero) - the Mach calls apparently require permissions (see TVL's comment under ProcessMetrics in base/process_util_mac.mm); moreover, getting all the VM information would be quite involved - libproc (see <libproc.h>) is an Apple-private interface which may (and I suspect will) change; apparently, there are already problems with (lack of) #pragma pack(4)'s on 64-bit in <sys/proc_info.h> - running ps seems like a reasonable option, since it's well-standardized; however, it doesn't appear to offer information on shared memory size - running top (in logging mode) is another option (providing more information about memory), but it doesn't let you pick out processes by PID; it's also very not-standardized and may change, possibly in incompatible ways - there really are no good programmatic interfaces, at least as of August 2007: <http://lists.macosforge.org/pipermail/macports-users/2007-August/005123.html> - one could take Apple's libtop <http://www.opensource.apple.com/source/top/top-39/libtop.c> (and .h), but this doesn't solve any problems (it's still using a private API, it still requires perms) Maybe the "top" poison is the tastiest (that, or "ps"). -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs -~----------~----~----~----~------~----~------~--~---
