[comp.sys.mac] System Heap tirade

billkatt@mondo.engin.umich.edu (billkatt) (12/04/89)

Its that heap size time of year again...
Strictly speaking, system heap resizing is not necessary.  However, some INITs
done properly use the heap size reserving stuff.  There are three solutions
to this problem:
1.  Resize the heap by editing the boot blocks (this includes heap fixer, etc.)
    This is the worst idea.  It just eats RAM, and doesn't contract when you
    throw some of your INITs out.
2.  Throw the offending INITs out.  If an INIT is neato-keen, but buggy, you
    are probably better off without it.  It would also be handy to mail the
    person who wrote it and tell them to read IM-V5, startup manager and fix
    his/her code.
3.  Run under MultiFinder.  this is my personal favorite.  This system heap
    will resize larger and smaller to fit under MF.  This is necessary with
    some programs such as Timbuktu.

For the adventurous out there, you can try adding sysz resources to the INITs
that you are having trouble with.

It is possible to live with stupid INITs.  I currently have about a row and
a quarter on my Mac II, and I have no stability problems, whatsoever.

Lets all band together and boycott INITs which are obviously not up-to-spec.
INITs which are unstable reflect poorly on the Mac.
-Steve

jskuskin@eleazar.dartmouth.edu (Jeffrey Kuskin) (12/04/89)

In article <1989Dec3.181013.8659@caen.engin.umich.edu> billkatt@mondo.engin.umich.edu (billkatt) writes:
>   [stuff deleted]
>
>For the adventurous out there, you can try adding sysz resources to the INITs
>that you are having trouble with.
>
You really don't have to be "adventurous" at all.  I had the same problem
while writing an interrupt handler -- it needed a 40K block of storage in
the system heap.  My solution was to create a "dummy" INIT which consisted
of:
    1)  A 'sysz' resource specifying how much free space was required.
        (See IM Vols. 4 and 5 for details).
 
    2)  An 'INIT' resource consisting of a single RTS instruction.

Ths INIT was, of course, executed at boot time.  Then, when the user
went to install the interrupt handler, the 40K block was usually
available (the handler could not be installed by the INIT for reasons
I won't go into.)
 
So... if you need system heap space, don't hesitate to use a sysz
resource, either in a dummy INIT as I did, or as part of an actual INIT.
 
-- Jeff Kuskin, Dartmouth College

ts@cup.portal.com (Tim W Smith) (12/12/89)

Speaking of the system heap, if you have a Mac plus, and have several
SCSI devices, and the total size of the drivers exceeds about 30k or
so, the system will crash.

It works fine on the SE and the II.

There seems to be some confusion within Apple as to how much space is
available in the system heap at boot time.  For example, if you report
the above problem with the Mac plus to MacDTS, they will tell you that
there is plenty of room for 30k of drivers.

						Tim Smith