Re: Windows array allocation problem



Walter Spector wrote:
Roy Lewallen wrote:
If that's true, then it's the answer to my question and the solution to my problem. If I know for sure how much will be unavailable, I can set the maximum allocation accordingly.

Note that the address space of a process can be further fragmented by
DSOs/DLLs - which can be dynamically loaded at various addresses at
run-time. Thus 'available memory' and 'available CONTIGUOUS memory'
can be two very different things...

Bottom line is that once your problem sizes start approaching 2 gbytes,
you need to start considering a change to a system supporting a 64-bit
memory model.

Unfortunately, I don't have the option of changing the systems of all the customers using this program.

All I need to know is how large an array I can reliably allocate. Surely there's some way to get this information in a 32 bit system.

From the responses I've gotten, it seems that allocating any array to any size is a risky business that might suddenly fail for lack of adequate contiguous memory.

Roy Lewallen
.



Relevant Pages

  • Re: Any alternative to the MmAllocateContiguousMemory?
    ... As I found the MmAllocateContiguousMemory function is not available in WDM architecture, does any alternative to it and provide contiguous memory allocation from non-paged pool? ...
    (microsoft.public.development.device.drivers)
  • Re: contiguous memory allocation problem
    ... I sometimes see that the USB driver is unable to allocate contiguous memory ... I am thinking about pre-allocating some memory for USB, ... which the USB system uses for memory allocation? ... The machine in question is running FreeBSD 7-current from April. ...
    (freebsd-hackers)
  • Re: Size of contiguous memory
    ... DEVICE_DESCRIPTION structure can affect the size of contiguous memory ... Can I use MmAllocateContiguousMemory function in WDM driver? ... >> Regards, ...
    (microsoft.public.development.device.drivers)
  • Any alternative to the MmAllocateContiguousMemory?
    ... WDM architecture, does any alternative to it and provide contiguous memory ... allocation from non-paged pool? ...
    (microsoft.public.development.device.drivers)
  • Re: FSL auxiliary files: proposed reorganization of words
    ... For dynamic arrays/matrices which have not been allocated, the value of addr is ambiguous. ... It is the programmer's responsibility to ensure that he/she doesn't attempt to use a dynamic array prior to allocation. ... If the header block structure is allowed to be implementation dependent, then provide an API function which returns the start of the header block. ...
    (comp.lang.forth)