Re: Windows array allocation problem
- From: Roy Lewallen <w7el@xxxxxxxxx>
- Date: Sat, 29 Sep 2007 13:35:10 -0700
glen herrmannsfeldt wrote:
Roy Lewallen wrote:I'm getting an "insufficient virtual memory" error when trying to allocate an array to a size which is about 385 MB less than the amount of available virtual memory. I'm using the Intel Visual Fortran v. 9.1 compiler, with the compiler and program running under Windows XP.
The allocation statement is
ALLOCATE(A(N), STAT = IStat)
where A is a KIND = 4 complex array. The operation fails, with STAT = 41 (insufficient virtual memory) with N somewhere between 214,358,000 and 214,358,881.(snip)
Your program itself and any other memory it uses also has to fit in
that space. I/O buffers, stack, and others that you don't usually
think about still count.
I understand that. But why aren't those accounted for by the GlobalMemoryStatus or GlobalMemoryStatusEx report of available virtual memory? How can I determine how much is actually available?
The OS and such should be in the other 2GB of the 4GB addressable,
but many others do still go in with your program.
As I understand Windows operation, each Windows application has its own 2 GB of addressable virtual memory space. The total virtual memory available to all running applications can add up to a great deal more than 4 GB. This is swapped to and from actual memory and the disk as needed. Normally, Windows applications don't need to be concerned how their own 2GB of address space is mapped to the system real and virtual memory, except for its potential profound effect of execution speed if swapping takes place. If this is correct, then I don't understand your statement about the "other 2GB", because each application doesn't consume 2GB of the addressable system memory.
Roy Lewallen
.
- Follow-Ups:
- Re: Windows array allocation problem
- From: glen herrmannsfeldt
- Re: Windows array allocation problem
- References:
- Windows array allocation problem
- From: Roy Lewallen
- Re: Windows array allocation problem
- From: glen herrmannsfeldt
- Windows array allocation problem
- Prev by Date: Re: Windows array allocation problem
- Next by Date: Re: gfortran, g95, and dual-core
- Previous by thread: Re: Windows array allocation problem
- Next by thread: Re: Windows array allocation problem
- Index(es):
Relevant Pages
|