| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
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. ;-)
| 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>) | |
| >Re: 64 bit addressing again (From: Jim Magee <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.