<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 17 April 2014 23:14, Orvid King via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the biggest advantage to this distinction would really be the<br>
cross-language API's, the GC can determine which pointers it owns,<br>
although I don't believe it currently exposes this capability.<br></blockquote><div><br></div><div>But in a lightning fast way? Let's imagine ARC refcounts were stored at ptr[-1], how can we know if this is a managed pointer or not?</div>
<div>I think the major hurdle in an ARC implementation is distinguishing a managed pointer from a malloc pointer without making (breaking?) changes to the type system.</div><div><br></div><div>I would also find this useful in language boundary interaction though. I have had numerous issues identifying proper handling of cross-language memory.</div>
</div></div></div>