Speeding up GC
David S. Miller
davem@redhat.com
Tue Jun 4 07:53:00 GMT 2002
From: Daniel Berlin <dberlin@dberlin.org>
Date: Tue, 4 Jun 2002 10:45:22 -0400 (EDT)
> 2) Functions like loop.c:product_cheap_p() generate RTL to see
> if valid expressions of a given type can be created and if so
> see what it looks like. Then the RTL is %100 forgotten.
>
> FIX: Create a "short-term" mode for GC allocation. Enable this
> mode around such allocations.
It might make more sense, rather than even bothering to mark this stuff,
to use memory pools/arenas.
Unlike obstacks, you can realloc/free given pieces of memory in the arena
easily, but you can destroy all of the arena at the end of the pass or
whatever.
This is kind of the "next level" of what I was proposing. Once you
have this "enter short-term mode" thing, you can have the "exit
short-term" call just reset the state of all the temporary GC pools as
if GC has been run on them and no references had been found.
See?
More information about the Gcc
mailing list