This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g77 & RAM access


On Wednesday, January 22, 2003, at 03:26 AM, Anuchit Aromsawa wrote:
What is the maximum physical memory (RAM) on PC
that g77 (or other fortran) can adrress?
With most memory models on most machines, one is limited to 2^n bytes in a single process, where n is either 32 or 64. 4GB for 32-bit systems, and a rather larger amount for 64 bit systems. I don't give a specific number for 64 bit systems, as you asked about RAM, and I suspect few 64 bit systems actually support 18446744073709551616 bytes of ram, anyway, I suspect you don't have $800G lying around to populate your machine with RAM, even if it supported it.

These numbers are further discounted based upon language, runtime environment, OS and possibly other factors. For example, with g77 on Cygwin on Win 98, I'd be surprised if you got anywhere near 4GB. 900MB used to be the upper limit, before that, it used to be smaller.

Now, that is for normal memory models. It is also possible on some machines (Windows) to use OS routines to address more than 4GB of RAM, but, to do so not at the same time, you map in different parts of RAM at different times. The user code has to manage this and page it into the virtual address space on demand, just before use. This also complicates the answer to your question greatly. There isn't a reason why one couldn't use the moral equivalent of the same trick under Linux, so then the limit would be the amount of ram you can fit inside the box. From, http://www.supermicro.com/iebc/Supermicro.htm, we see that 32GB is fairly easy to come by, so certainly at a minimum, 32GB would be one answer, however, if you have money, you can buy almost any amount you want, and if you want to play software tricks, there really is no limit, other than your wallet.

AMD's new processor is limited to right around 2^40, or right around 1TB, so if you wanted, you could probably have someone build you a Linux box that had 3/4TB of user land RAM directly addressable per process, without any tricks.

Hopefully I've given you a smattering of numbers that you can select one you like, as they are all different. If you don't like those, I'm sure others can give you even more numbers, though, this list isn't quite the right place for a wondering discussion.

The other answer, is to write a program that calls malloc, and run it on your PC, and just print the largest number that you can call malloc with that returns non-zero. :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]