PRB: Windows 95/98 Heaps Have A 255.9 MB Allocation Ceiling

ID: Q198959


The information in this article applies to:


SYMPTOMS

There is a hard-coded limit on Windows 95/98 for a single heap allocation. This limit is 104 bytes shy of 256 MB.

This limit will apply to HeapAlloc() and any function that internally calls HeapAlloc(); including LocalAlloc(), GlobalAlloc(), and many implementations of the C-runtime library's malloc() function.


STATUS

This behavior is by design.


MORE INFORMATION

If you expect your memory blocks to be larger than one or two megabytes, you can avoid significant performance degradation by using the VirtualAlloc() or VirtualAllocEx() functions instead. When working with the heap functions, memory allocations are classified into the following three block size ranges:

Additional query words: kbDSupport


Keywords          : kbKernBase kbMemory 
Version           : WINDOWS:
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 15, 1999