Software Archive
Read-only legacy content
17060 Discussions

Memory Allocation Problems

sprasad
Beginner
1,115 Views
I have a dual Athlon machine with 2 GB of physical RAM and 3 GB of virtual memory. When I try to allocate 2 double precision arrays of size greater than 11250 by 11250, the application exits with an insufficient virtual memory error. This is very strange!!! At 11250,11250 size, 8 bytes per array gives me a total memory requirement of only 1.93 GB. So what is going on? I have searched the Compaq knowledge base without success. Any help is much appreciated.

p.s. increasing the VM allocation to 4 GB did not help either.
0 Kudos
5 Replies
Jugoslav_Dujic
Valued Contributor II
1,115 Views
You hit the OS limit. 32 bits can address 4GB of memory, of which Windows reserves 2 GB for itself. What's left is in theory 2GB but in practice you can hardly get more than about 1.7.

Jugoslav
0 Kudos
sprasad
Beginner
1,115 Views
Windows reserves 2 GB for itself???? I didn't know that - I knew about the 4 GB addressable limit, but didn't realise that applications were limited to a max of 2 GB. I may have to seriously consider moving to Linux now.
0 Kudos
Steven_L_Intel1
Employee
1,115 Views
Jogoslav is correct. More specifically, process address space is 2GB, and system (shared) address space is 2GB. This is a popular design in 32-bit operating systems.

If you want more, you'll need a 64-bit processor such as Alpha and a 64-bit OS (Linux will do). WIndows NT on Alpha was 32-bits. Linux and Windows on Itanium are 64-bit, but this may or may not be an appropriate solution for you now.

Steve
0 Kudos
jhp
Beginner
1,115 Views
From Steves answer one can conclude that working with 32 bits we will found the same limit in memory addresable under windows and under linux?
0 Kudos
Steven_L_Intel1
Employee
1,115 Views
If you're talking x86 Linux, yes. Alpha Linux and Itanium Linux are 64-bit.

Steve
0 Kudos
Reply