IDG logo

Advertise with InfoWorld

SiteMap News Test Center Opinions Forums Careers Stock Quote Subject Indexes About Us Search Subscribe Home [Window Manager]

July 8, 1996

Stock up on spare stack pages in Windows 95

In my fifth anniversary column on June 24, I mentioned the setting MaxBPs=768. This setting, added to the [386Enh] section of a Windows 3.1 system, reduces crashes by setting aside an extra 4KB of extended memory for Windows break points.

Windows 95, by contrast, dynamically allocates break points, which are 10-byte chunks of memory used to track virtual device drivers (VxDs). As VxDs use more memory, Win95 simply assigns more memory to break points. That's why the MaxBPs line is no longer needed in Win95.

In answer to questions by some readers, yes, the MaxBPs=768 setting does still work in Windows 3.11 and Windows for Workgroups 3.11, but it is not needed in Win95. (If you want to use the MaxBPs setting, request back issues dated Jan. 24, Jan. 31, and Feb. 7, 1994, from InfoWorld for full details on configuration. See Reader Resources, page 100, for the telephone number.)

It now appears that Win95 may have its own setting to deal with a similar but different kind of program crash. This setting deals exclusively with 32-bit software.

The problem that afflicts 32-bit software affects stack pages. These pages are 4KB blocks of memory that Win95 sets aside for 32-bit device drivers to use as a stack. (A stack, in this case, refers to a scratch area of memory used by programs. This entire discussion of stack pages, by the way, is unrelated to the STACKS= command found in Config .sys, which is used by 16-bit DOS drivers.)

If a 32-bit device driver exceeds 4KB of memory for its stack, the program causes an error, but Win95 can recover. This is because Win95, by default, maintains two extra memory pages known as spare stack pages.

Unfortunately, many Win95 users are finding that even having two spare stack pages is not enough for some of the drivers they're running. In this case, you'll see a confusing error message similar to the following: "There are no spare stack pages. It may be necessary to increase the setting of `MinSPs' in System .ini to prevent possible stack faults. There are currently 2 SPs allocated."

The typical user, facing this message, could be forgiven for having a blank look. What's a MinSPs and what should it be increased to? Looking in Win95's System.ini file (yes, System.ini is still there, and it's still used for many things) doesn't reveal anything that looks like MinSPs.

The solution is to add a MinSPs (minimum stack pages) line to the [386Enh] section of your System.ini. Start with a value of 4, which doubles the spare stack pages, and restart Windows. If that value doesn't resolve the problem, try 6 and then 8. Each spare stack page consumes 4KB of extended memory.

Adding this setting to your System.ini file will result in it looking like this:

;Increases stack pages from 2 to 4.

Make this change with Windows Notepad or any plain-text editor. In case you haven't looked for it since you first installed Win95, System.ini is in your C:\Windows folder.

Just as Microsoft decided to allocate break points dynamically in Win95 (so users wouldn't have to guess how many to allocate in System.ini), perhaps Microsoft will eventually update Win95 so drivers can't run out of stack space.

In the meantime, if you are experiencing this problem and the MinSPs setting resolves crashes you've been facing, let me know by sending a tip to me via e-mail or by sending me a fax at the number below.

Brian Livingston is the coauthor of the new Windows 95 Secrets and author of three other Windows books (IDG Books). Send tips to or fax: (206) 282-1248.

Missed a column? Go back for more.

Copyright © 1996 by InfoWorld Publishing Company


Copyright © 2002. InfoWorld Media Group, Inc. is a member of complies with the ASME guidelines with IDG extensions For New media.