This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] provide means to access the zone from the corresponding chunk
On May 8, 2004, at 2:57 AM, Paolo polimi wrote:
Daniel Berlin wrote:
On May 7, 2004, at 9:59 AM, Paolo Bonzini wrote:
This patch enables the zone collector to recover the page_entry and
alloc_zone structures from the address of an arbitrary ggc_alloc-ed
pointer. Unfortunately, while very useful, this is quite invasive.
Why do we need to do this?
What exactly useful property does being able to get the page entry
have?
It allows to recover the zone from the chunk, without *any* kind of
overhead. For example, it allows to track inter-zone pointers or
chunks that live in the garbage_zone.
Sorry if i seemed abrupt. It's finals time, and I was incredibly
curious what you were going to use this for.
If that is your goal, it may indeed be worth it.
Tracking inter-zone pointers is necessary to be able to mark one zone
at a time (without marking other zones).
However, there are other things necessary to do this that I was working
on first (you need to be able to mark by typecode, at least for most
things. This ends up being more invasive than we'd like.)
I agree it may not be worth spending four bytes per chunk, but at zero
cost...
Paolo