Windows 3.1 and Windows NT Can Share Virtual Memory Space

Last reviewed: May 12, 1997
Article ID: Q105882
The information in this article applies to:
  • Microsoft Windows NT operating system version 3.1
  • Microsoft Windows NT Advanced Server version 3.1

SUMMARY

The following two methods can be used to save disk space on computers that have both Windows 3.1 and Windows NT installed:

  • Sharing the PAGEFILE.SYS file

    -or-

  • Creating and sharing a dedicated pagefile partition

MORE INFORMATION

Sharing the PAGEFILE.SYS File

If performance requirements allow running Windows 3.1 with a temporary swap file, Windows can be configured to use a swap file named PAGEFILE.SYS. This prevents Windows from creating the default swap file WIN386.SWP.

Because Windows (versions 3.0 and 3.1) and Windows NT both delete and recreate their virtual memory space each time they are loaded, only one file will ever exist. This method requires a temporary swap file in Windows 3.1 and that PAGEFILE.SYS be stored on a FAT partition.

To change the name of Windows 3.1 temporary swap file, do the following:

  1. Edit the SYSTEM.INI file and find the [386 Enhanced] section.

  2. Update PagingFile=c:\WIN386.SWP to PagingFile=x:\PAGEFILE.SYS, where x is the drive letter that contains PAGEFILE.SYS.

  3. Save the file and restart Windows for the changes to take affect.

Creating and Sharing a Dedicated Paging Partition

This method is used when Windows 3.1 needs a permanent swap file, which consists of the files 386SPART.PAR and SPART.PAR. It has four requirements:

  • A dedicated partition
  • A FAT file system
  • A batch file (details follow)
  • A requirement of exiting Windows 3.1 in the proper manner

The steps to implement this method are the following:

  1. Back everything up, if required, and repartition the hard disk using the MS-DOS FDISK command.

  2. Create a dedicated partition large enough to hold only the Windows swap file, 386SPART.PAR. Because Windows NT can support paging files across multiple drives, limiting the size of the drive will not limit the size of PAGEFILE.SYS.

  3. Restore files if necessary.

  4. Start Windows NT. In the Control Panel window, choose the System icon, choose the Virtual Memory option button, and then change the drive where PAGEFILE.SYS is located to the drive of the partition you just created. Enter the size available in both the Initial Size and Maximum Size fields. Zero out any other drives that may have also been designated. Choose Set and OK to save changes. Quit Windows NT.

  5. Start the system into MS-DOS and delete PAGEFILE.SYS from the paging partition.

  6. Start Windows 3.1. In the Control Panel window, choose the 386 Enhanced icon, choose the Virtual Memory option button, and then change the drive letter to the drive of the paging partition you just created. In the Type box, select Permanent. In the New Size box, enter the number shown in the Space Available field. You will receive a message stating the number is too large and to change it to a smaller number. Accept this number by choosing the OK button. Choose Yes when asked if you really want to make this change. Quit Windows 3.1. You must now create a custom batch file to start Windows 3.1.

  7. Rename WIN.COM to __WIN.COM so that "WIN" no longer starts Windows.

  8. Create the following batch file using a text editor and call it WIN.BAT. This file deletes the Windows NT paging file PAGEFILE.SYS and runs the renamed executable file _WIN.COM to start Windows. When Windows terminates, WIN.BAT normalizes the swap file files and deletes them so they won't take up space when you run Windows NT.

          WIN.BAT
          @ECHO OFF
          IF EXIST x:\PAGEFILE.SYS DEL x:\PAGEFILE.SYS
          __WIN
          ATTRIB -r C:\windows\spart.par
          ATTRIB -r -h -s x:\386SPART.PAR
          DEL C:\windows\SPART.PAR
          DEL x:\386SPART.PAR
    

    Where x:\ is the dedicated paging partition drive.

Both of these methods also work for Windows for Workgroups.


Additional query words: wfw wfwg prodnt
Keywords : kbother ntgeneral
Version : 3.1
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 12, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.