[squeak-dev] Pointer finder and processes

Bert Freudenberg bert at freudenbergs.de
Thu Jan 12 15:59:32 UTC 2012


On 12.01.2012, at 15:53, Levente Uzonyi wrote:

> On Tue, 10 Jan 2012, Bert Freudenberg wrote:
> 
>> On Mon, 9 Jan 2012, Bert Freudenberg wrote:
>>> It's more important to be correct than to be fast - and I agree finding pointers is its main purpose, so your fix looks like an improvement.
>> 
>> 
>> Speaking of correctness: the pointer finder does not find an object that is held only by a process. Can we fix this?
> 
> Can provide an example?
> 
> 
> Levente


| object |
object := {0}.
[
	| objRef |
	objRef := object.
	[
		objRef at: 1 put: (objRef at: 1) + 1.
		Transcript show: objRef first; cr.
		(Delay forSeconds: 1) wait.
	] repeat.
] forkNamed: 'Ref Test'.
object explorePointers.
object := nil.

Initially, the explorer will find two objects pointing to the array - one is from the outer closure of the doIt, the other is the PointerExplorer itself. If you then toggle the array in the explorer, only one reference remains, from the explorer. 

Use the process browser to kill the process. Or before that, try to find references to the process itself from the browser's "inspect pointers" item. It seems to be held by a Semaphore, but nothing appears to hold the Semaphore.

- Bert -





More information about the Squeak-dev mailing list