Heap Manager Change in Service Pack 4 and Windows 2000ID: Q195008
|
Windows NT version 4.0 Service Pack 4 and Windows 2000 contain changes in the heap manager allocation pattern to provide for better performance and scalability for multithreaded applications, particularly when running on symmetric multiprocessing (SMP) computers. These changes might expose user-mode, process heap allocation bugs in some applications.
If you encounter such a bug after applying Service Pack 4 to Windows NT 4.0, you can add the application to a list maintained in the registry. This will cause Windows NT to revert to the Service Pack 3 and earlier heap allocation patterns for that particular application.
If you encounter a bug after upgrading to Windows 2000, modify your application to manage heap properly.
The Internet Explorer Service Pack 4 and Windows 2000 heap manager changes may cause blocks of freed or reallocated memory to be reused for subsequent allocations in a different order than with the Service Pack 3 heap manager. This may expose heap-related bugs in some applications when running under Service Pack 4 or Windows 2000 that were previously not seen when running under Service Pack 3 (or earlier).
The symptoms of such an application bug can vary greatly, from a simple access violation to a more obscure loss of functionality or apparently corrupted data.
Consider if an application frees a block of memory and later (errantly) fetches some data from that freed block. With Service Pack 3, that freed block might remain intact and unmodified between the time the application freed it and later fetched data from it, so the problem would not be apparent. With Service Pack 4 and Windows 2000, that same freed block might be reused for another allocation request in the application, which would cause it to be modified before the application fetches the freed heap block data, so the results fetched from that freed heap block might be different.
Another example is reallocating a heap block. With Service Pack 3, reallocating a heap block to a smaller size may not cause the block to move to a new address in memory, but with Service Pack 4 or Windows 2000, that same reallocation request may cause the block to move. If an application assumes the reallocated block will not be moved to a new address when it is reallocated, that may cause problems when running under Service Pack 4 or Windows 2000 that would not be apparent when running under Service Pack 3.
If you suspect an application is encountering such a problem because of this change in heap behavior between Service Pack 3 and Service Pack 4, add the application to the Image File Execution Options list in the registry, according to the directions in the following article in the Microsoft Knowledge Base:
Q195009 Application Access Violation or Hang After Applying SP4Adding the application to this list causes the Service Pack 4 heap manager to revert to Service Pack 3 (or earlier) allocation patterns for that particular application.
Additional query words: AV stack hang error compatguidestability
Keywords : NT4SP4Fea kbNTOS400 kbWinOS2000 kbNTOS400sp4
Version : WINDOWS:; winnt:4.0
Platform : WINDOWS winnt
Issue type : kbinfo
Last Reviewed: August 3, 1999