[gclist] Boehm collector vs lazy allocation with demand paging

stuart stuart@cosc.canterbury.ac.nz
Wed, 09 Apr 1997 00:44:12 +1200


> The Mercury implementation uses the Boehm (et al.) collector.
> 
> Unfortunately this idea doesn't work with the Boehm collector,
> because the collector scans all of memory, which I think causes
> the memory to allocated (even though the collector is only reading
> it, not writing to it), and which certainly slows down garbage
> collections.

Could you assume that there are not valid pointers following a run of 
at least PAGESIZE nulls ? Then you could stop checking this object after
that many nulls in a row ...

This would be similar in principal a dynamic form of 
GC_malloc_ignore_off_page().

This would, of course, load an extra page into your address space per
object, but if your objects are significantly bigger than PAGESIZE, 
it may work.

stuart


-- 
         stuart yeates <stuart@cosc.canterbury.ac.nz> aka `loam'
           --- reality is for those who don't write poetry ---