Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!apple.com!stm From: stm@apple.com (Steve Maller) Newsgroups: comp.sys.mac.hypercard Subject: Re: Protection against memory limitation Message-ID: <1393@internal.Apple.COM> Date: 15 Apr 89 01:06:38 GMT References: <80078GFX@PSUVM> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 22 In article <80078GFX@PSUVM> GFX@PSUVM.BITNET writes: > Other than warning users that they need a full meg to use the stack, what > could be done to 1) exit gracefully from a script if there is not enough > memory to execute, 2) detect memory shortage before it creates any problem. > Any other reaction, comment or suggestion? The HyperTalk function "the heapspace" returns the currently available amount of RAM. A little known (feature) of HyperCard is at every idle message, HyperCard checks to see that there is at least 32K of free memory. If it doesn't find it, it will complain and quit. But while a handler or an XCMD is executing, the amount of free memory can drop to zero. Another recommendation is to make sure that you empty out any large HyperTalk globals that you allocate, such as text read in from a file. Cheers, Steve Maller HyperCard Tools Engineer Apple Computer