Creating a View of a File May Leak Pages of Memory

ID: Q242161


The information in this article applies to:
  • Microsoft Windows 98
  • Microsoft Windows 98 Second Edition


SYMPTOMS

A program that uses the Win32 CreateFileMapping() and MapViewOfFile() functions to create and map views of files may experience memory leaks when running on Windows 98 or Windows 98 Second Edition.


CAUSE

After you create a view of a file with the Win32 CreateFileMapping() and MapViewOfFile() functions, locked non-cached pages are used to create the view of the file. When the UnmapViewOfFile() and CloseHandle() functions are called to release the view of the file, the locked non-cached pages are not returned to the system.

An accounting problem in Vmm.vxd causes an internal allocation routine to not allocate additional pages to functions (for example, the MapViewOfFile function). As a result, it appears to the calling program as though the system is out of available pages of memory.


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the fix. 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://www.microsoft.com/support/supportnet/overview/overview.asp
The English-language version of this fix should have the following file attributes or later:

   Date      Time      Version     Size      File name   Platform
   -------------------------------------------------------------------------------
   9/21/99   11:07am   4.10.1999   472,564   Vmm.vxd     Windows 98
   9/21/99   10:33am   4.10.2223   472,564   Vmm.vxd     Windows 98 Second Edition 


STATUS

Microsoft has confirmed this to be a problem in Windows 98 and Windows 98 Second Edition.

Additional query words: fail fails failed

Keywords : kbprg win98 win98se
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 18, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.