Thread View: comp.lang.clos
2 messages
2 total messages
Started by William Clinger
Wed, 14 Oct 1992 07:15
Re: How to neatly destroy instances?
Author: William Clinger
Date: Wed, 14 Oct 1992 07:15
Date: Wed, 14 Oct 1992 07:15
33 lines
2207 bytes
2207 bytes
I think it is intuitively obvious that for most such structures the
application is in a far better position to know when the structure will
be of no further use.
Whether obvious or not, I don't think this is true. In complex
applications with shared data structures, the only way the application
can know when a structure will be of no further use is by maintaining
some kind of reference count, or by implementing a custom garbage
collector. Automatic garbage collection is more reliable, and is
usually faster as well because more programming effort can be justified
for a general-purpose collector than for a single-purpose collector.
...A substantial portion of the time to GC isn't
sticking cons cells back on the free list, but deciding which ones need
to be so stuck. So I still claim having an explicit free (or at least
some amount of low-level control on memory allocation, WHEN NEEDED AND
APPROPRIATE) would be 'a good thing'.
At best, explicit deallocation takes time proportional to the number
of nodes being freed. Modern garbage collectors can and often do
operate in less time than explicit deallocation, because they use
algorithms whose time is proportional to the number of nodes that
are live in heuristically chosen regions that have a low percentage
of live data.
Your argument is similar to the argument that explicit storage
overlays will always outperform automatic paging. Garbage
collection has a theoretical advantage over explicit deallocation,
however, so the case for garbage collection is even stronger than
was the case for automatic paging.
William Clinger
how to neatly destroy instances?
Author: ssmith
Date: Thu, 15 Oct 1992 15:47
Date: Thu, 15 Oct 1992 15:47
20 lines
1349 bytes
1349 bytes
In article<9210142115.AA04377@skinner.cs.uoregon.edu>will@skinner.cs.uoregon.edu (William Clinger) writes: > ... > At best, explicit deallocation takes time proportional to the number > of nodes being freed. Modern garbage collectors can and often do > operate in less time than explicit deallocation, because they use > algorithms whose time is proportional to the number of nodes that > are live in heuristically chosen regions that have a low percentage > of live data. > Forgive my lack of knowledge (or perhaps more likely lost memory pathways) and laziness in not finding and reading the right papers: Could you please give a 2 paragraph summary/tutorial on how the modern generational schemes give time proportional to the number of live nodes? How do they maintain which are live and which dead? Dr. Stephen P. Smith
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads