This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: an idea to speed up GC


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]