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:01 AM, Shawn Erickson wrote:

On Feb 11, 2004, at 2:57 AM, Andreas Lachner wrote:

On Tuesday, Sep 16, 2003, at 15:50 US/Eastern, Mike Vannorsdel wrote:
This seems to imply 64-bit addressing is already there. However, from
discussions in here it seems it's not implemented.

There was an answer: no 64-bit addressing support.

To be clear no 64-bit virtual addressing for user tasks or the kernel at this time however the the VM system and IO system (DMA) can handle more then just 4GB of physical RAM.

This is basically correct. To split hairs, the kernel does use 64-bit virtual addressing mode for managing some of its own data structures (without having to take away from the already limited first 4GB of kernel virtual address space from drivers, etc...). But there is no way for a KEXT to run in this mode or access that "high" data. For the foreseeable future, everything in the kernel (outside the virtual memory system implementation itself) will be limited to a 32-bit kernel VM space.

How can I address 8 GB of ram at all?

One way is to use multiple processes/tasks. On one of the darwin lists a few months back a few folks (including Apple folks) hashed out how to do this, I cannot recall which list at the moment.

As as been said many times, Darwin 7.x will manage as much physical RAM as you can put in the machine. Given the kernel's Unified Buffer Cache (UBC) design, that RAM will cache the contents of files and dynamically allocated RAM according to a (modified) LRU algorithm. So, if you have one big file, or many small ones, you can keep up to 8GB of their contents in RAM.

To access those contents, you can either perform read/write operations from those files (which will copy the contents from the cache RAM to a buffer already in the application). Or, if you must avoid the copies that such operations would cause, you can either have multiple address spaces (as suggested above), or simply map the desired portions of the files into your address space on an as-needed basis. The cost of the mapping operations is relatively low (certainly compared to having to actually transfer the contents into RAM). Using multiple address spaces is really just another form of this last approach - since you have to "window" into those other address spaces by mapping portions of it into the process that once to see the data (which is the same overhead as just windowing into the files in the first place).

--Jim
_______________________________________________
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: Shawn Erickson <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.