Re: Address Space Limit - 2.25GB Per Process? (fwd)
Well, I wish I could have dug up a memory layout of a Mach or OSX process to work from, but anyway, I know that Windows likes to give the user 2GB of VM to use and keeps 2GB to map to read-only OS parts of memory. The total, 4GB is about how many words of memory you can talk about with 32 bits. (The 3.5GB case wasn't in the win2k case study I read, so I don't know exactly what the MS guys are doing there.) I'm not sure as to all the details behind why the designers choose to split the virtual memory into two parts. One bonus is that there is a single bit difference between the two segments (as far as VM adressing goes) and so checking for user memory or kernel memory is very eays! Most all OSs split up your total memory space in some way. That space is then divied up even further by the particular compiler to manage the runtime stack(s)(used in calling functions with nice LIFO-data object), the program heap (with not-so-nice lifetime object) and the program text and constants (which are, well constants). Note that not all programing languages need heaps, so some don't use them. I believe Fortran would not benefit from a heap. Anyway, the bottom line is we poor User-land users don't get all 32bits of adressable memory. How much we do get is dependent on a bunch of details. For instance (not to get too far off topic) if you have two thread running, there must exists a runtime stack for each (to track the function calls). Where do we stick that other stack? This is one of those design decisions that compiler folks have to deal with. :-) Hope this helps some! Sam On Thu, 31 Oct 2002, Jeremy T. Fox wrote:
I tried to find the most memory I could allocate via Fortran (g77) and
I got 2.25GB (on a G4 with 512MB of physical memory). Does Mac OS X
have a limit of 2.25GB per process, or is this something strange with
Fortran and/or my machine?
For comparison, Windows has a limit of 2GB per process (tunable to 3GB
if you shell out for Advanced Server), while I believe the default on
Linux is 3GB, which can be upgraded to 3.5GB with the right patch. I
don't know about FreeBSD. Clearly 64-bit machines do not have this type
of limitation.
Jeremy, who hopes that one day Apple will support 1GB DIMMs :)
--------------------
Jeremy T. Fox
jerfox@stanford.edu
_______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
samuel@udel.edu