Re: Windows array allocation problem
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.
The OS and such should be in the other 2GB of the 4GB addressable,
but many others do still go in with your program.
-- glen
.
Relevant Pages
- Windows array allocation problem
... 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. ... (comp.lang.fortran) - Re: Windows array allocation problem
... I've just written a program which does nothing except call GlobalMemoryStatus to get the available virtual memory, then allocates an array to that size and in decreasing steps until STAT returns zero. ... The maximum allocation is consistently 146 MB less than the reported available virtual memory. ... So the phenomenon isn't due only to how Windows handles virtual memory but how the compiler handles it. ... The test shows that even for the simplest program, the Intel compiler doesn't allow allocating as much of the application virtual memory as the Compaq compiler does, at least not to one large array. ... (comp.lang.fortran) - Re: Windows array allocation problem
... allocate an array to a size which is about 385 MB less than the amount of available virtual memory. ... In both cases a call to Windows API function GlobalMemoryStatus or GlobalMemoryStatusEx immediately before the ALLOCATE statement returns a value of available virtual memory of 2,118,221,824 bytes. ... So I'm getting an "insufficient virtual memory" failure when trying to allocate the array to a size which is 384.665 MB less than the amount of reported available virtual memory. ... (comp.lang.fortran) - Re: Windows array allocation problem
... allocate an array to a size which is about 385 MB less than the amount of available virtual memory. ... In both cases a call to Windows API function GlobalMemoryStatus or GlobalMemoryStatusEx immediately before the ALLOCATE statement returns a value of available virtual memory of 2,118,221,824 bytes. ... So I'm getting an "insufficient virtual memory" failure when trying to allocate the array to a size which is 384.665 MB less than the amount of reported available virtual memory. ... (comp.lang.fortran) - Re: Insufficient virtual memory
... the program stops with the error message "insufficient ... It might be that virtual memory really is too small, ... compiler writers were good at minimizing the ... (comp.lang.fortran) |
|