an idea to speed up GC

Jamie Lokier jamie.lokier@cern.ch
Mon Mar 13 07:25:00 GMT 2000


Richard Henderson wrote:
> There are two critical points to this scheme.  First, one must be
> able to mark pages read-only (eg. mprotect) and then be able to
> handle a fault to such a page and restart (segv handler that provides
> the address of the write).

With a handler that can be quite slow too -- unless the data is
genuinely "frozen" and rarely changes.

You can do it a lot faster without the segv handler -- you just need an
OS-specific way to ask "has this page been modified?"

I suspect mincore that's working its way into Linux could be extended
for this info.  But that doesn't help other systems.

> The first point requires a lot of system-specific hackery.  Look
> at some of the code in bohem-gc and try not to vomit.

Thanks, I was wondering where to find that kind of code ;-)

(I'm writing exactly the sort of thing being discussed here, including
type-specific pages and so on but for a /decompiler/.  Who knows,
eventually the generic concrete data type code might be usable by GCC).

-- Jamie


More information about the Gcc mailing list