Precise GC
deadalnix
deadalnix at gmail.com
Mon Apr 9 14:06:50 PDT 2012
Le 09/04/2012 20:33, Manu a écrit :
> Eh?
> Not sure what you mean. The idea is the template would produce a
> struct/table of data instead of being a pointer to a function, this way
> the GC could work without calling anything. If the GC was written to
> assume GC info in a particular format/structure, it could be written
> without any calls.
> I'm just saying to leave that as a possibility, and not REQUIRE an
> indirect function call for every single allocation in the system. Some
> GC might be able to make better use of that sort of setup.
If you have reference to objects, you can't avoid a function call. If
you have something you know at compile time, the generated function can
directly call the other function that mark the pointed data (or even can
do it itself, if you don't fear code bloat) without going back to the GC
and its indirect call.
So it make no difference in the number of indirect calls you have, but
the struct proposal is a stronger constraint on the GC that the function
one.
BTW, starting you answer by « Not sure what you mean. » should have been
a red flag.
More information about the Digitalmars-d
mailing list