🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #15340

RE: Out Of Memory Conditions

#15340
From: rs4u#
Date: Mon, 30 Mar 1987 17:34
16 lines
1321 bytes
While I haven't dealt with QuickDraw, I too check
my error returns and so forth, but I believe that the best
cure is *prevention*. Every so often, check the amount of available
memory. (I do it before the user opens a file or DA, for example). If
there's less than a certain amount (say, 8K) available, display an alert
telling the user that there's not much memory available.

This generally is safer than having to deal with error retrusn on an emergency
basis, or handling the unpredictable results when you *do* run out of memory.

While QuickDraw doesn't return error codes, it does use the Memory Manager
calls (for handling RgnHandles and so forth), so by checking MemError,
you should be able to figure out what's going on...

		--Rich
Technical Details
Message-ID: <MS.V3.18.rs4u.80022e06.hamlin.ibm032.1664.5@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!ANDREW.CMU.EDU!rs4u#

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!ANDREW.CMU.EDU!rs4u#
From: rs4u#@ANDREW.CMU.EDU.UUCP
Newsgroups: comp.sys.mac
Subject: RE: Out Of Memory Conditions
Message-ID: <MS.V3.18.rs4u.80022e06.hamlin.ibm032.1664.5@andrew.cmu.edu>
Date: Mon, 30-Mar-87 12:34:41 EST
Article-I.D.: andrew.MS.V3.18.rs4u.80022e06.hamlin.ibm032.1664.5
Posted: Mon Mar 30 12:34:41 1987
Date-Received: Wed, 1-Apr-87 00:59:36 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 16