Re: mmap alignment.
Re: mmap alignment.
- Subject: Re: mmap alignment.
- From: Shaun Wexler <email@hidden>
- Date: Mon, 13 Feb 2006 23:24:02 -0800
On Feb 13, 2006, at 9:00 PM, Theo Schlossnagle wrote:
Using the vm_map() directly may be one approach. We already use
pthread_mach_thread_np in part of the porting effort. As it will
be allocating a tremendous amount of memory and efficient use is a
goal, over-allocating and doing alignment ourselves isn't the right
approach.
All allocations larger than 4k are page-aligned by default. If you
want blocks guaranteed to start on 64k virtual address boundaries,
create a custom zone and factor all of your allocations thru one
function, padding sizes to mod 64k, and throw away the first 1-15
pages (up to 60k) for the initial alignment.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
"Problems cannot be solved by the same level of thinking that created
them." - Albert Einstein
_______________________________________________
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