Hello there! Thanks for the excelent software

I'm quite confused about weak hash tables in ECL.

I have simple test program:

.-----[~/tmp/whash.lsp
|  (defvar gg (make-hash-table :weakness :value))
|  
|  (loop repeat 100 do
|    (setf (gethash (gensym) gg)
|          (loop repeat 10 collect (random 100))))
|  
|  #+ecl (format t "Has weak hash: ~A~%" (not (null (member :ecl-weak-hash 
*features*))))
|  (format t "Before GC: ~A~%" (hash-table-count gg))
|  #+sbcl (sb-ext:gc :full t)
|  #+ecl (si:gc t)
|  (format t "After GC: ~A~%" (hash-table-count gg))
`-----

Its ouput from SBCL

.-----[$ sbcl --script ~/tmp/whash.lsp
|  Before GC: 100
|  After GC: 0
`-----

and from ECL

.-----[$ ecl -shell ~/tmp/whash.lsp
|  Has weak hash: T
|  Before GC: 100
|  After GC: 100
`-----

ECL's results looks a little awkward.  Does weak hash tables really
work in ECL?  Or do I misuse them in some manner?

thanks!

-- 
lg

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to