On Sunday, 8 May 2016 at 11:16:56 UTC, deadalnix wrote:

Ones that have only pointers are probably OK too. Though I'm not sure if a precise scanner takes into account the type of the pointer. I would expect it to use embedded typeinfo in target block.

-Steve

Because of void* and classes, the GC MUST be able to find out what type was actually allocated, or at least its pointer bitmask.

Yep, and it does that by looking at metadata of the pointed object itself, it doesn't care about the type of pointer to that object. I mean if we have object x of class X in heap and pointers "X p1", "void* p2" and "Y p3" all having same value &x (pointing to the same address) then GC will have no problem in scanning x as long as it can access x's type info knowing the address of x in heap. Which means all p1, p2 and p3 might easily be just at one position in a union and that would not be a problem.
      • Re: GSoC 2016 - P... Jack Stouffer via Digitalmars-d-announce
        • Re: GSoC 2016... jmh530 via Digitalmars-d-announce
        • Re: GSoC 2016... Jeremy DeHaan via Digitalmars-d-announce
          • Re: GSoC ... jmh530 via Digitalmars-d-announce
            • Re: ... Jeremy DeHaan via Digitalmars-d-announce
              • ... jmh530 via Digitalmars-d-announce
              • ... Jeremy DeHaan via Digitalmars-d-announce
              • ... Dmitry Olshansky via Digitalmars-d-announce
              • ... Steven Schveighoffer via Digitalmars-d-announce
              • ... deadalnix via Digitalmars-d-announce
              • ... thedeemon via Digitalmars-d-announce
              • ... Pham via Digitalmars-d-announce
          • Re: GSoC ... Leandro Lucarella via Digitalmars-d-announce
  • Re: GSoC 2016 - Precise GC Dsby via Digitalmars-d-announce

Reply via email to