Further request: a callback for begin and end of collection phase

downs default_357-line at yahoo.de
Sat Jan 12 03:00:51 PST 2008


Another problem :(

Somebody pointed out to me that mmapped files are not scanned by the GC by default.
Since I use them for my virtual stacks, this naturally caused me some problems.

So I went ahead and addRanged the mmapped files.

Experimentation revealed, however, that reading these files during the GC phase
caused the OS to allocate memory for them, thus causing exactly what the use of MmFiles was
meant to prevent - an explosion of memory usage.

Thus, I want to request the addition of a way to register callbacks with the GC that are
run before and after the collection phase.

This would allow me to add only the required range to scan (ESP to vstack top), thus avoiding
the memory explosion problem.

 --downs
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thread_add_stacktop_override_and_callback.patch
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080112/8da1f7e2/attachment.ksh>


More information about the Digitalmars-d mailing list