Re: Process virtual memory cleanup takes quite a lot of time
On Jan 24, 2012, at 12:53 AM, Alexander Potapenko wrote:
The following program:
===================== $ cat p.c #include <sys/mman.h> int main() { void *t = mmap(0, 0x00000fffffffffffUL, PROT_READ| PROT_WRITE, MAP_ANON | MAP_PRIVATE | MAP_NORESERVE, -1, 0); } =====================
runs for half a second on my 64-bit Snow Leopard machine: ===================== $ time ./p
real 0m0.545s user 0m0.000s sys 0m0.544s =====================
According to Shark, most of the time is spent in pmap_remove at exit time:
Do you get better performance on Lion? If I recall correctly, SnowLeopard's kernel data structures do not efficiently handle memory mappings that are significantly larger than 4 GB. -- Greg Parker gparker@apple.com Runtime Wrangler _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.app... This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg Parker