[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error Handling during rlet
- To: CAMPER@AppleLink.Apple.COM (Camper, Dan)
- Subject: Re: Error Handling during rlet
- From: email@example.com (Bill St. Clair)
- Date: Mon, 11 Oct 1993 19:14:38 -0500
- Cc: info-mcl
At 4:29 PM 10/11/93 +0000, Camper, Dan wrote:
>I have a small function that attempts to create a temporary record of 134 bytes
>via an rlet. If the function fails (with a "memory allocation request failed"
>error message) I'd like to perform a cleanup action that could free some RAM
>and then try the rlet again -- my question is, what is that cleanup action?
>Will a call to GC clear memory for this purpose? In this particular case the
>function is being called while handling an Apple Event so I'd like to handle
>the error within the same event cycle, if possible.
>Any thoughts and suggestions would be appreciated!
"memory allocation request failed" means that the garbage collector ran
and could not free enough memory to satisfy a request. Running out
of memory means that either you need to run MCL in a bigger partition (via
the "Get Info" command in the Finder), or your program has a memory leak
(e.g. (loop (setq *x* (cons nil *x*))) The only way to free up memory is to
explicitly get rid of something, e.g. with REMHASH, FMAKUNBOUND, MAKUNBOUND,
or setting slots of objects to NIL (e.g. (setq *x* nil)).
The problem has nothing to do with RLET, which allocates its memory on the stack.