[Vm-dev] Detecting objects that point to an object

stephane ducasse stephane.ducasse at gmail.com
Tue Jul 20 20:45:50 UTC 2010


bert 

the idea was to use imagesegment but to see if we could then grow the graph to include under the root the outpointers
and sawp everything at once witohut having a part of the subgraph not swapped.
The problem with imagesegment (netsyle guys discovered it badly) is that if you have outpointers you may end up 
have to kill the curretn process and other friends to get rid of outpointers so that you can save your complete rooted graphs.
For seaside for example
	fork an image
	kill everything
	save the graph without outpointers
	throw away the image....
not that friendly at the end. 

Stef

On Jul 20, 2010, at 8:20 PM, Bert Freudenberg wrote:

> 
> On 20.07.2010, at 04:47, Mariano Martinez Peck wrote:
> 
>> 
>> 
>> On Mon, Jul 19, 2010 at 7:59 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>  
>> 
>> 
>> On Mon, Jul 19, 2010 at 7:35 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>> 
>> Mariano, can you tell us, why you need to know, how many objects pointing to
>> a specific one?
>> The reference counting is well known solution to this, but it is less
>> effective than garbage collection
>> (in terms of memory management), since you have to touch the counters
>> at each memory write.
>> 
>> and recursively when objects are freed.
>> 
>> Further, for two reasons one will also need a scan-mark garbage collector to collect all garbage.  It is inevitable that one won't waste space on a reference count that can hold the max number of references and so the system will have to deal with a max count and have some objects with an overflowed count.  Reference counting cannot easily deal with circularities and so a cycle of references will result in non-zero ref counts for nodes in the cycle and prevent garbage collection.
>> 
>> 
>> 
>> Thanks for the answers. Maybe I should have explained why I needed that. What I had in mind, is to be able to detect subgraphs. But not any kind of subgraphs, but only those on which ALL objects are ONLY reachable from the root of the subgraph. This means, that there are no objects outside the graph, pointing to objects inside the graph. In ImageSegment word, would mean to detect subgraphs that don't have outPointers. 
> 
> So why not simply use an ImageSegment? IIRC that's how Croquet islands are checked for closedness.
> 
> - Bert -
> 
> 



More information about the Vm-dev mailing list