Is it true that objects in memory never change relative position? The garbage collector only slides objects and never swaps them. If this characteristic is likely to remain. I would like to surface the oops in the image so we can sort objects by them and do binary searches on them. I find this useful for creating a LargeIdentityDictionary that has a hash table of 4096 entries (exhausting the 12 bits of identity hash) with buckets in each entry that hold its elements in sorted oop order. The objects in the buckets can then be search using binary search on their oops. What do you think? -Anthony
How do you kill a process whose objects have gone away? I created a clock process (part of Mark's examples) and then made the mistake of quitting without terminating the process. Now I have an orphan clock that wont go away. I did as he suggested and did:
Smalltalk garbageCollect. Process allInstances inspect.
This produced a long array of 34 processes, most of which say "a Process in UndefinedObject>>DoIt". Mark says to 'find the one you want (probably near the bottom of the list) and send it terminate."
My question is:
How do I select a receiver from this array to terminate?
R.
On Saturday 30 June 2001 12:35, Rosemary Michelle Simpson wrote:
How do you kill a process whose objects have gone away? I created a clock process (part of Mark's examples) and then made the mistake of quitting without terminating the process. Now I have an orphan clock that wont go away. I did as he suggested and did:
Smalltalk garbageCollect. Process allInstances inspect.
This produced a long array of 34 processes, most of which say "a Process in UndefinedObject>>DoIt". Mark says to 'find the one you want (probably near the bottom of the list) and send it terminate."
My question is:
How do I select a receiver from this array to terminate?
Easiest way is to use the Process Browser (World menu/debug/open Process Browser). If they're still around, something's hanging on to them. Are you assigning the Process to a variable (you must be or it would be GC'd when it stopped)? You need to find (and delete) whatever's hanging on to the variables that are hanging on to the Processes.
Just select one of your defunct processes in the Process Browser, kill it (using the context menu), then see if it goes away. If not, pop up the context menu again, and choose "chase pointers". You'll see what's hanging on to that Process. Then just nil out the variable, re-collect garbage, and it should be gone.
I added that when I made the Process Browser because this was a common problem for me.
squeak-dev@lists.squeakfoundation.org