
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon Marlow wrote:
I think what you're proposing is often called "hash consing", except that hash-consing is usually done at construction time, you want to do it at GC time.
My take is it would only be worthwhile if there was a *lot* of sharing to be gained by doing it, and in most cases there wouldn't be.
Sounds likely. I wonder if there's a theoretical limit on the amount of memory "wasted" by not doing this (maybe some function of the amount of memory needed after such compaction?)
This is just a guess based on my experience poking around in the heap though - feel free to try it out and prove me wrong :-)
if I feel like it, which seems a bit unlikely - might be useful as a last-ditch garbage collection technique, but the process probably needs nontrivial amount of memory itself so maybe not :-) Issac -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGdowTHgcxvIWYTTURApAWAKCUmB/HR+NzRMMjqpIie2r79gojlACfQ0Wm ei5l3/1JvNphTeUMV5Wg2uI= =u8/0 -----END PGP SIGNATURE-----