[Issue 3929] Interactions between LRU array cache, memory recycling
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 11 19:07:18 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3929
--- Comment #7 from David Simcha <dsimcha at yahoo.com> 2010-03-11 19:07:16 PST ---
Well, there are really two issues here: What happens when GC.free() gets
called and what happens when the GC collects. As much as people (Andrei comes
to mind) hate it from a theoretical purity point of view, I believe it's
absolutely necessary to be able to GC.free() a large array while the GC sucks
as bad as it currently does.
For the GC collection case I still don't understand what's wrong with clearing
the LRU. If I understand how this stuff works correctly, the information is
also stored at the end of every block, so on the next append the cache will be
repopulated. It will only cost one non-cached lookup per array per GC
collection.
For the GC.free() case you raise a very good point about thread safety. I
really don't have a good answer for it. Calling free() doesn't have to be
cheap, but stopping the world is a little too expensive.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list