Re: Process virtual memory cleanup takes quite a lot of time
Re: Process virtual memory cleanup takes quite a lot of time
- Subject: Re: Process virtual memory cleanup takes quite a lot of time
- From: Greg Parker <email@hidden>
- Date: Tue, 24 Jan 2012 11:03:05 -0800
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 email@hidden Runtime Wrangler
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden