Re: Windows array allocation problem



Tim Prince wrote:
The 2GB virtual space (3GB if you add /3GB boot switch) is occupied not
only by your arrays, but by the OS, its data tables, your program, ...
The available space has been decreasing as patches are added, with SP2
taking up a huge chunk. Not that we could advise you to run without the
patches.

Each Windows application is allotted a 2 GB virtual memory space. You're saying that each of those includes the operating system?

API function GlobalMemoryStatus or GlobalMemoryStatusEx returns both the total virtual memory (dwTotalVirtual or ullTotalVirtual) and available virtual memory (dwAvailVirtual or ullAvailVirtual). The total virtual value returned is 2 GB as expected. The available virtual is less than 2 GB, and I had thought that the amount used by the program, other arrays, and so forth had been subtracted, leaving the amount that's, well, available. But it isn't available for the allocation of the array. Which is my question. How much really is available for the allocation, how can I find out how much is, and why doesn't the GlobalMemoryStatus report the amount really available?

Roy Lewallen
.



Relevant Pages

  • Re: vectorization not using filter
    ... wandering into virtual memory. ... sqrtof the 2D arrays once than eack vector at a time inside the ... In both cases the loop was twice as ... let you near all of that gig of ram. ...
    (comp.soft-sys.matlab)
  • Re: In Search for a better Algorithm
    ... better algorithm. ... virtual memory, and involve disk transfers. ... representing empty arrays with a NULL pointer. ... Please do not exceed 72 char line length. ...
    (comp.lang.c)
  • Re: Windows array allocation problem
    ... experiment where I allocated three arrays in sequence. ... fragmenting the virtual memory space during startup before any code is ... The compiler certainly isn't doing any fragmenting, ... library just calls either malloc or a Win32 routine to allocate ...
    (comp.lang.fortran)
  • [PATCH 00/10] NR_CPUS: third reduction of NR_CPUS memory usage x86-version v2
    ... Patches that are actually different are marked "v2". ... Here's the third round of removing static allocations of arrays using ... In addition, there's a cleanup of x86 non-smp code, the movement of ... percpu variables patchset to this one, as I was encountering a panic ...
    (Linux-Kernel)
  • Re: Fastcode MMs for Beginners
    ... How do I change the code to dynamically set the array ... You could use a linked list of smaller arrays. ... Allocate the smaller arrays ... on the Windows heap using HeapAlloc, or directly from virtual memory using ...
    (borland.public.delphi.language.basm)