[comp.sys.mac.programmer] System heap too small under System 7 ??

pratt@csn.org (Jonathan Pratt) (06/21/91)

We've noticed what appears to be a pretty serious problem with System 7.
The problem is that it is relatively easy to get into a situation where
the system heap is filled.  Unfortunately, under System 7 the standard
file packages have been moved to the system heap, so people lose their
work when standard file fails to run, or even worse, crashes.

This problem has been observed with reproduceability on Macintosh IIci's
with 4-5 megabytes ram.  When eight megs. are installed the problem is
mcuh harder, if not impossible, to reproduce.  The easiest way to make
the problem occur is run a large program immediately after booting the
Mac.  By large I mean one whose partition is greater than available
memory, but you're allowed to run with what's there.  We haven't exper-
imented in detail, but you might need to have a window with a lot of
icons open in the Finder.  You can tell that memory is a problem then
because the Finder issues a notification manager call in an attempt to
tell you that it wants to close the window.

If you now try to do something with standard file there is a good chance
of failure, either because PACK #6 cannot be loaded (System and Multi-
Finder heaps full), or because of a bug (possibly in a CDEF) that crashes
the machine, usually due to an illegal instruction.  I theorize that the
latter occurs when an unlocked piece of code calls something that
scrambles memory (only under lo-mem conditions though, since TMON's
heap scrambler doesn't bring it out under normal circumstances).

For the skeptics I'll mention that this has happened on several different
systems, some with no non-system extensions.  In tracking it down I was
able to get Microsoft Word 4 to crash as described, so I know it's not
just our app.

What I'd like to know is whether others have observed this problem, and
what work-arounds there are, aside from the ones we use (upgrading to
eight megs. or always leaving a couple hundred spare k free for
MultiFinder/system heap expansion).

Jonathan

-- 
/* Jonathan Pratt            Internet: pratt@boulder.colorado.edu  *
 * UCHSC, Box A034           uucp: ..!ncar!boulder!pratt           *
 * 4200 E. Ninth Ave.                                              * 
 * Denver, CO 80262          Phone: (303) 270-7801                 */