Help and Support
 

powered byLive Search

Memory Allocations May Fail When There Are Large Free Blocks

Article ID:216383
Last Review:February 22, 2007
Revision:2.5
This article was previously published under Q216383

SYMPTOMS

Memory allocations may return "Out of Memory" errors even when there are large free blocks of memory available within the virtual address space of the process.

Back to the top

CAUSE

Heap allocations within a process may result in the memory manager having to extend the heap using virtual memory to satisfy the request. The memory manager extends the heap by allocating contiguous virtual memory from the process address space. By default, the memory manager requests double the previous successfully allocated heap segment. If it fails allocating virtual memory for a larger heap segment, it does not try to allocate a segment the size of the previous or smaller segments.

For example, if the previous successfully allocated heap segment was 64 MB, the heap manager will attempt to extend the heap by 128 MB if it needs to extend the heap. If there is not 128 MB of contiguous virtual memory, the allocation to extend the heap will fail and the heap allocation will subsequently fail even though there may have been another 64-MB free block.

Back to the top

RESOLUTION

To resolve this problem, obtain the latest service pack for Windows NT 4.0 or the individual software update. For information on obtaining the latest service pack, please go to:
http://www.microsoft.com/windows/servicepacks/ (http://www.microsoft.com/Windows/ServicePacks/) -or-

152734 (http://support.microsoft.com/kb/152734/EN-US/) how to obtain the latest windows nt 4.0 service pack
For information on obtaining the individual software update, contact Microsoft Product Support Services. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)

Back to the top

STATUS

Microsoft has confirmed that this is a problem in Microsoft Windows NT version 4.0. This problem was first corrected in Windows NT version 4.0 Service Pack 5.

Back to the top

MORE INFORMATION

Ntdll was fixed so that, if Ntdll.dll cannot extend the heap because of an "Out of Memory" error on a first attempt, it divides the requested virtual memory allocation size by 2 and will continue to attempt to extend the heap in this way until the size requested falls below what is needed to satify the heap allocation.

Back to the top


APPLIES TO
Microsoft Windows NT Server 4.0, Terminal Server Edition Service Pack 4
Microsoft Windows NT Server 4.0 Standard Edition
Microsoft Windows NT 4.0 Service Pack 1
Microsoft Windows NT 4.0 Service Pack 2
Microsoft Windows NT 4.0 Service Pack 3
Microsoft Windows NT 4.0 Service Pack 4
Microsoft Windows NT Workstation 4.0 Developer Edition
Microsoft Windows NT Server 4.0 Enterprise Edition

Back to the top

Keywords: 
kbhotfixserver kbqfe kbbug kbfix kbqfe KB216383

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.