This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: an idea to speed up GC
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: an idea to speed up GC
- From: Jamie Lokier <jamie dot lokier at cern dot ch>
- Date: Mon, 13 Mar 2000 16:25:34 +0100
- Cc: Zack Weinberg <zack at wolery dot cumb dot org>, gcc at gcc dot gnu dot org
- References: <20000311120007.P269@wolery.cumb.org> <20000312172748.A5617@cygnus.com>
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