Re: Why does free() take 1,100 microseconds?
Re: Why does free() take 1,100 microseconds?
- Subject: Re: Why does free() take 1,100 microseconds?
- From: Jan Brittenson <email@hidden>
- Date: Wed, 27 Jul 2005 01:41:32 -0700
neal olander wrote:
What could free() be doing that could possibly take 1,100
microseconds, and is there any thing I can do to reduce that time?
Perhaps it's paging?
Try not to free it but reuse the same buffer instead. Allocate it not
with malloc, but with vm_allocate,
then vm_wire it. This avoids paging and bypasses the global malloc
lock. It also gives you a nice
page-aligned buffer that you can then slice and dice any way you want
(e.g. for cache coloring).
_______________________________________________
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