[comp.sys.mac] Resizing the System Heap

phd11@cs.keele.ac.uk (Tony McDonald ) (12/02/89)

Hi Netters,

Is it a good idea to expand the size of the system heap (using
bootedit perhaps...it's a VERY old program, is there anything better?)
to prevent system crashes with many INITs etc. loaded? (the system heap IS
where INIT's are loaded, isn't it?).

I only ask, as I noticed that there was only 6000 bytes free (roughly)
out of a system heap of 200+k (using Macsbug 6.1) and I'd like
to make my system more robust. !!

-- 
Tony McDonald (Tones)		
                                JANET:    phd11@uk.ac.kl.seq1
               ~ *              ARPANET:  phd11@seq1.kl.ac.uk
               \_/              BITNET:   phd11%uk.ac.kl.seq1@ukacrl

drew@cup.portal.com (Andrew E Wade) (12/03/89)

There's a little utility called something like HeapSize that CESoftware       
distributes with their QuickMail email software.  I've used it, following     
their instructions.  I'm not sure if it's legal to distribute on net --
presumably they retain rights.                                                
CE Software                                                                   
1854 Fuller Rd                                                                
PO Box 65580                                                                  
W. Des Moines, Ia.  50265  USA                                               
Their manual doesn't have email address, but I know that have a few,          
just don't have them here.  You might try cesoftware@mcimail.com.             
-Drew                                                                         

francis@mirror.UUCP (Joe Francis) (12/03/89)

Speaking of resizing the heap, how do I do this?  I boot off a hard
drive, does this make a difference?  How do I find the appropriate
sector/byte?  What is a good program to do the editing with, especially
a public domain one would be nice.  Thanks for assistance.

------------------------------------------------------------------------
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
Joe Francis					Nobody expects the
francis@mirror.TMC.COM				Spamish Repitition

oster@dewey.soe.berkeley.edu (David Phillip Oster) (12/03/89)

You should not need to manually resize the system heap. There is a
mechanism, documented in the Startup Manager chapter of Inside Mac, Vol 5,
for attaching a 'size' resource to an INIT that will cause the system to
automatically grow the system heap.

Apple put this in so INITs that start big device drivers in the system
heap can get the system heap space without going through contortions at
run time.

It has a bug in it though: if this mechanism is used to make the system
heap be bigger than 1/2 the total RAM, the system heap will overflow into
the INIT time stack, and the mac will crash.

Ordinary mortals should never need to concern themselves with this level
of system booga-booga.

> The mac is a detour in the inevitable march of mediocre computers.
> drs@bnlux0.bnl.gov (David R. Stampf)
--- David Phillip Oster          -master of the ad hoc odd hack. 
Arpa: oster@dewey.soe.berkeley.edu 
Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu 

truesdel@ics.uci.edu (Scott Truesdell) (12/03/89)

oster@dewey.soe.berkeley.edu (David Phillip Oster) writes:


>You should not need to manually resize the system heap. There is a
>mechanism, documented in the Startup Manager chapter of Inside Mac, Vol 5,
>for attaching a 'size' resource to an INIT that will cause the system to
>automatically grow the system heap.

>Apple put this in so INITs that start big device drivers in the system
>heap can get the system heap space without going through contortions at
>run time.

> [...]

>Ordinary mortals should never need to concern themselves with this level
>of system booga-booga.

Then why is it that when people start running lots of INITs and/or some
memory hog INITs, the system heap gets so full? Is this because not
many INIT writers use the aforementioned 'size" resource correctly or
at all? Why is it that when my users start experiencing "unexplainable"
random crashes and I check out "About Finder..." and see that the
System "thermometer" is all black with no free white, that after I pump
up the system heap size, the crashes disappear?

Is there a better way to deal with this problem?

  --scott

--
Scott Truesdell

chuq@Apple.COM (Chuq Von Rospach) (12/04/89)

drew@cup.portal.com (Andrew E Wade) writes:

>There's a little utility called something like HeapSize that CESoftware       
>distributes with their QuickMail email software. 

It's HeapSizer. Their "Widgets" program (part of their Disktop package) also
does it.

> I'm not sure if it's legal to distribute on net --
>presumably they retain rights.                                                

No, it's not legal to distribute.

-- 

Chuq Von Rospach   <+>   chuq@apple.com   <+>   [This is myself speaking]

When it comes to matters ourside your specialties, you are consistently and
brilliantly stupid [....] with respect to matters you haven't studied and
have had no experience basing your opinions on casual gossip [....] and
plain misinformation -- unsuspected because you haven't attempted to verify it.
	-- Robert Heinlein to J.W. Campbell, Jr. 1941

tim@hoptoad.uucp (Tim Maroney) (12/05/89)

oster@dewey.soe.berkeley.edu (David Phillip Oster) writes:
>You should not need to manually resize the system heap. There is a
>mechanism, documented in the Startup Manager chapter of Inside Mac, Vol 5,
>for attaching a 'size' resource to an INIT that will cause the system to
>automatically grow the system heap.
>
>Apple put this in so INITs that start big device drivers in the system
>heap can get the system heap space without going through contortions at
>run time.

(Those interested can read the brief docuemntation of the 'sysz' 0
resource on page IM V-352.)

In article <2578F219.21993@paris.ics.uci.edu> truesdel@ics.uci.edu
(Scott Truesdell) writes:
>Then why is it that when people start running lots of INITs and/or some
>memory hog INITs, the system heap gets so full? Is this because not
>many INIT writers use the aforementioned 'size" resource correctly or
>at all?

Probably a combination of that and the strange implementation of the
sysz resource.  It does *not* grow the system heap by the size
specified in the sysz resource.  Instead, it makes sure that there is
at least that much space in the system heap.  This is an important
difference, and frankly, it makes the sysz pretty near useless.
There's no cumulative effect.  Having twenty INITs each asking for X
bytes in the system heap is the same as having two INITs each asking
for X bytes.

>Is there a better way to deal with this problem?

Hopefully, Apple will not break INITs that continue to use the time-
honored BufPtr method, which at least lets you guarantee yourself
enough space to run.
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"Jesus died for somebody's sins, but not mine." -- Patti Smith

jh0576@leah.Albany.Edu (Joe Houghtaling) (12/06/89)

   Widgets, a program that comes as part of the DiskTop package from CE      
   software, will allow you to reset the size of the system heap.  It even 
   comes with instructions and warnings in the manual!  DiskTop, even 
   without Widgets (which also does a host of other nifty and diverse things)
   is a really neat program!
------------------------------------------------------------------------------
joe houghtaling
jh0576@leah.albany.edu

(tried responding to the authors, but the responses bounced.)