[Openmcl-devel] dispose-record not available in OpenMCL?

Gary Byers gb at clozure.com
Fri Mar 19 11:32:19 PST 2004



On Fri, 19 Mar 2004, [ISO-8859-1] Stéphane Letz wrote:

> Hi,
>
> In MCL an object allocated with "make-record" is supposed to be freed
> with "dispose-record".
>
> "make-record" is available in OpenMCL but not "dispose-record".
>
> What are we supposed to use?
>
> Thanks
>
> Stephane Letz
>

Both CCL::MALLOC and CCL::FREE should be exported and documented.

MAKE-RECORD macroexpands into a call to CCL::MALLOC (and some
initialization code.)

In MCL, records could (supposedly) be either "pointer based" or "handle
based", and this was (at one time) believed to be an attribute of the
record type.  DISPOSE-RECORD therefore had to try to figure out at runtime
whether its argument was a pointer or handle (though it could be given a
hint); this determination was made by examining Mac Memory Manager block
headers, which wasn't a good idea ...

All that you need to do to dispose of anything allocated via CCL::MALLOC
is to call CCL::FREE on that pointer.  I suppose that that might change
someday, and that possibility suggests that it'd be best to revive and
export some way of ... disposing of what MAKE-RECORD allocated, however
it was allocated.

For the time being, just calling CCL::FREE should work fine.




More information about the Openmcl-devel mailing list