Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007350 [Squeak] Collections minor always 05-06-09 22:08 02-06-11 23:48
Reporter nicolas cellier View Status public  
Assigned To leves
Priority normal Resolution fixed  
Status closed   Product Version 3.10.2
Summary 0007350: WeakSet tend to grow because they don't recycle nil slots
Description When objects are reclaimed, they are replaced with nil in the WeakSet array.
However, due to implementation of #scanFor: these nilled-slots are never reused until the next WeakSet #grow.

Adrian Lienhard reported a nice example at
http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.general/133778 [^]
Additional Information Beware, nil slot cannot be recycled without taking care of possible collisions as developped in the squeak-dev thread above.

We must first take care to #fixCollisionsFrom: nilIndex.

Please find a fix attempt below. To be tested extensively!
Attached Files  M7350-WeakSet-recycleNilSlots-nice.1.cs [^] (2,011 bytes) 05-06-09 22:10
 M7350-WeakSet-recycleNilSlots-nice.2.cs [^] (2,540 bytes) 05-06-09 23:43
 M7350-WeakSet-tests-nice.1.cs [^] (5,076 bytes) 05-06-09 23:44

- Relationships

- Notes
(0013120 - 112 - 118 - 118 - 118 - 118 - 118)
nicolas cellier
05-06-09 23:44

Sorry, M7350-WeakSet-recycleNilSlots-nice.1.cs was bugged !
Try M7350-WeakSet-recycleNilSlots-nice.2.cs instead
 
(0013122 - 176 - 230 - 230 - 230 - 230 - 230)
nicolas cellier
05-07-09 10:05

"fix begin"
Installer mantis bug: 7350 fix: 'M7350-WeakSet-recycleNilSlots-nice.2.cs'.
"fix test"
Installer mantis bug: 7350 fix: 'M7350-WeakSet-tests-nice.1.cs'.
"fix end"
 
(0013907 - 141 - 141 - 141 - 141 - 141 - 141)
leves
11-07-10 02:19

The problem was solved in Squeak 4.1 in a different way. Slots are reclaimed during growing and removal. I integrated the tests to the Trunk.
 

- Issue History
Date Modified Username Field Change
05-06-09 22:08 nicolas cellier New Issue
05-06-09 22:10 nicolas cellier File Added: M7350-WeakSet-recycleNilSlots-nice.1.cs
05-06-09 23:43 nicolas cellier File Added: M7350-WeakSet-recycleNilSlots-nice.2.cs
05-06-09 23:44 nicolas cellier File Added: M7350-WeakSet-tests-nice.1.cs
05-06-09 23:44 nicolas cellier Note Added: 0013120
05-07-09 03:19 lewis Issue Monitored: lewis
05-07-09 10:05 nicolas cellier Note Added: 0013122
11-07-10 02:19 leves Status new => resolved
11-07-10 02:19 leves Fixed in Version  => trunk
11-07-10 02:19 leves Resolution open => fixed
11-07-10 02:19 leves Assigned To  => leves
11-07-10 02:19 leves Note Added: 0013907
02-06-11 23:48 leves Status resolved => closed


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
54 total queries executed.
36 unique queries executed.
Powered by Mantis Bugtracker