Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mmap alignment.



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: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: mmap alignment. (From: Theo Schlossnagle <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.