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: 64 bit addressing again



On Feb 11, 2004, at 11:58 AM, Steve Baxter wrote:
I got this working after a lot of help from this list a couple of months back. If you search the archives for my posts you should see how!

Basically, you need to have a scheme that manages your large blocks of memory. I used C++ objects to do this.

You can use vm_allocate() to allocate blocks. You need to get a memory entry to each allocated block as well using mach_make_memory_entry().
...<snip>...
- I tried mmap() but it was more fiddly. The advantage of this scheme is that you don't have to allocate any files - the default pager will do all this for you. I also found that mmap() was significantly slower than this scheme, probable because it was trying to keep data on the disk up to date even though it doesn't have to.

Hmmm. If one never calls msync(), we should be no more interested in keeping mmap()'ed files in sync with the disk than we are anonymous (vm_allocate()ed) memory. Do you have a code snippet (I remember your previous posts - but I don't remember ever reproducing your results in this area).

Thanks,
--Jim

- vm_*() are private functions and could go away in a future version of Mac OS, though this is very unlikely.

And thanks for posting that caveat. ;-)
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >64 bit addressing again (From: Andreas Lachner <email@hidden>)
 >Re: 64 bit addressing again (From: Josh de Cesare <email@hidden>)
 >Re: 64 bit addressing again (From: Steve Baxter <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.