Re: Windows array allocation problem
Roy Lewallen wrote:
(snip)
It appears that some people have taken "available virtual memory" to
mean the entire 2GB which is allotted to the application, and have
explained that the entire amount can't be used. I understand that, but
that's not what I meant. By "available virtual memory" I meant the
amount that's actually available for use at the moment that the array
allocation is made. This would mean the original 2GB less whatever has
already been used by the program, stack, other allocations, and so
forth.
Another that I haven't seen mentioned yet is fragmentation.
If you, or the library routines your program calls (such as I/O
routines) allocates some memory blocks and then deallocates some but
not all of them it might be that the available virtual memory is
not contiguous. ALLOCATE will (as far as I know) always allocate a
contiguous block of memory. Functions that report the total amount
available will sum up the available blocks.
My program has provision for approximately predicting the
additional memory which will be used later in the program, and adjusts
the allocation accordingly. But it needs to know how much it has
altogether to work with. GlobalMemoryStatus(Ex) reports a "total virtual
memory" (2GB) and "available virtual memory" (less than 2GB). I had
assumed that the "available virtual memory" was the amount currently
available for such purposes as array allocation.
-- glen
.
Relevant Pages
- Re: Windows array allocation problem
... If I won't be able to allocate nearly all the available virtual memory, how can I determine in advance how much I *can* safely allocate? ... By "available virtual memory" I meant the amount that's actually available for use at the moment that the array allocation is made. ... My program has provision for approximately predicting the additional memory which will be used later in the program, and adjusts the allocation accordingly. ... (comp.lang.fortran) - Re: a big limit of mathematica?
... to the amount of virtual memory it is allocated by the operating system, and perhaps by the maximum amount of memory Mathematica declares it is going to use. ... Under Paging file size for selected drive, type a new paging file size in megabytes in the Initial size or Maximum size box, and then click Set. ... possible allocation of memory should be something other than ... (sci.math.symbolic) - 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: GC performance - GC fragility
... Though the GC heap will look like one before compaction. ... allocation sizes to different "heap blocks", but it can't be IMHO generally be prevented. ... If you only have macro-fragmentation in the virtual memory space, you can operate with limited fragmentation-induced waste in the allocated memory space. ... that's because the concurrent GC can be gotten into a cycle of never ending GC compaction if your allocation rate exceeds or equals the compaction rate, a condition easy to reach when part of your allocated pool is swapped out. ... (borland.public.delphi.non-technical) - Re: Windows array allocation problem
... If the required size exceeds the possible size, the program has internal virtual memory management to solve the problem in pieces, storing intermediate pieces on the disk. ... much is available for an actual allocation. ... since the array dimension and the determination of whether to use the virtual memory manager are presently being determined by the calling program and passed in. ... (comp.lang.fortran) |
|