[Openmcl-devel] sharing data between fortran and OpenMCL

Cyrus Harmon ch-openmcl at bobobeach.com
Fri Oct 1 15:17:37 PDT 2004


I suppose this might be a bit offtopic, but here goes anyway. So why 
does data get moved around by the GC? I'm sure this must have been a 
frequent topic for discussion on c.l.l. long ago, but I don't know the 
answer. I can see the arguments for the benefit of heap compaction a la 
the old MacOS memory management model, but what is it about GC that 
necessitates moving data? In the C world, one just mallocs and frees 
memory and lets the OS sort it out. Long-lived blocks stick around, and 
others don't but the data doesn't move. I can see certain applications 
(DB, file system, e.g.) where one would like to manage memory in a 
compact, fixed-size manner and provide for a nice compact memory 
layout, but with modern VMs, is this really such an issue for 
allocating/releasing LISP data?

Thanks,

Cyrus

On Sep 30, 2004, at 2:06 PM, Gary Byers wrote:

> Lisp data can be moved around in memory by the GC.
> Because lisp threads are preemptively scheduled, a GC can occur
> between any two instructions.
> It is therefore meaningless to talk about taking the address of
> a lisp object (in general; it would work for things that were
> stack-allocated, or allocated via %MAKE-HEAP-IVECTOR, and it might
> work a very high percentage of the time otherwise - the GC doesn't,
> after all, run on -most- instruction boundaries.)




More information about the Openmcl-devel mailing list