Knowledge of managed memory pointers

Manu via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 17 06:51:07 PDT 2014


On 17 April 2014 23:14, Orvid King via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> I think the biggest advantage to this distinction would really be the
> cross-language API's, the GC can determine which pointers it owns,
> although I don't believe it currently exposes this capability.
>

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?
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.

I would also find this useful in language boundary interaction though. I
have had numerous issues identifying proper handling of cross-language
memory.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140417/b682559c/attachment-0001.html>


More information about the Digitalmars-d mailing list