#178: [TODO] remove PMC_struct_val from src/gc/mark_sweep.c
--------------------+-------------------------------------------------------
Reporter: cotto | Owner: whiteknight
Type: todo | Status: assigned
Priority: normal | Milestone: 0.9.1
Component: core | Version:
Severity: medium | Keywords: gc pmc
Lang: | Patch:
Platform: all |
--------------------+-------------------------------------------------------
Comment(by whiteknight):
The GC works on PObjs, and objects that are isomorphic with PObjs (PMCs
and STRINGs, mostly). The definition of PObj is this:
{{{
typedef struct pobj_t {
UnionVal u;
Parrot_UInt flags;
} pobj_t;
}}}
If the UnionVal disappears (which I assume is the end goal), then we don't
have any good place in the PObj to store a pointer like this. The pointer
in question joins PObjs together into a linked list.
GC_MS also uses PObj_buflen(p), which is also part of the UnionVal
structure. We could easily repurpose ->flags to take the place of
PObj_buflen(p) here, but then we have no place to store the next-on-the-
free-list pointer that's being displaced here.
If we add a new generic void* "->ptr" field to Pobjs in place of the
UnionVal, this could serve the purpose nicely. Also, it would help us
transition the GC more gracefully to one that uses headers (such as a
copying collector, or a real generational one).
Even a small change like this is going to require a lot of regression
testing since the GC is so temperamental. I would love to hear what other
people think about this first though.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/178#comment:3>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets