Cloning in D

dsimcha dsimcha at yahoo.com
Mon Sep 6 07:01:57 PDT 2010


== Quote from Jacob Carlborg (doob at me.com)'s article
> I've looked at this problem now but I don't know I can detect the
> aliasing. Suggestions ?

Well, here's what I was thinking of doing when I was thinking of rolling my own:

Traverse the object graph once.  Create some data structure of all pointer
indirection, including both the start address and the length.  Then, sort this by
starting address and find all overlapping regions.  Whenever you find an
overlapping region, duplicate/serialize it as a single block and make everything a
slice into it.


More information about the Digitalmars-d mailing list