[comp.sys.mac.programmer] LightspeedC Cache Crash

rs4u+@andrew.cmu.edu (Richard Siegel) (02/26/88)

If your cache is up *above* 512K, and you're running on System 4.1 or later,
it's highly likely that LightspeedC can't start up; usually it gives
an error message. However, there will be times (and this is probably one of 
them) when LightspeedC simply cannot get enough memory to warn you that
memory's critical and exit gracefully.

The only solution is to cut your cache size. (I personally don't
use the cache; it's been responsible for crashing my hard disk 
more times than I care to recall.)

		--Rich

===================================================================
Richard Siegel
THINK Technologies, QA Technician (on leave)

I'm not physically at THINK, so my information may be out
of date. Be forewarned.

Arpa: rich.siegel@andrew.cmu.edu
UUCP: {decvax,ucbvax,sun}!andrew.cmu.edu!rich.siegel
==================================================================

lsr@Apple.COM (Larry Rosenstein) (03/02/88)

In article <IW9-Ngy00UjIMtg077@andrew.cmu.edu> rs4u+@andrew.cmu.edu (Richard Siegel) writes:
>
>If your cache is up *above* 512K, and you're running on System 4.1 or later,
>it's highly likely that LightspeedC can't start up; usually it gives
>an error message. However, there will be times (and this is probably one of 
>them) when LightspeedC simply cannot get enough memory to warn you that
>memory's critical and exit gracefully.


First, this is not intended as a criticism of LSC in particular.

I think people would agree that this is not the correct behavior.  Putting
up a message does not require all that much memory and should be done in all
reasonable situations.  I would expect any application to run in 10K, but I
believe that the Control Panel does not allow you to set the cache so high
that you have less than 128K of RAM.

In MacApp we went to great trouble to ensure that if an application had 100K
or so, it would not crash because it was out of memory.  One of the things a
MacApp programmer does is specify the maximum working set of the
application.  (You do this by listing the code segments that make up that
working set, plus you can add a fixed amount of memory on top of that.)

The MacApp initialization code will check to see if that amount of memory is
available and will put up a message if it isn't.  This code can run in a
very small amount of memory (~30K) and so the user should always get the
appropriate message.

It is perfectly understandable that this kind of check would be low on the
priority list, given the pressures of releasing a product.  But it is
something that can be solved and should not be ignored forever.

-- 
		 Larry Rosenstein,  Object Specialist
 Apple Computer, Inc.  20525 Mariani Ave, MS 32E  Cupertino, CA 95014
	    AppleLink:Rosenstein1    domain:lsr@Apple.COM
		UUCP:{sun,voder,nsc,decwrl}!apple!lsr