Knowledge of managed memory pointers

Tove via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 18 03:10:35 PDT 2014


On Friday, 18 April 2014 at 00:01:25 UTC, Manu via Digitalmars-d 
wrote:
> On 18 April 2014 04:10, Kagamin via Digitalmars-d <
> digitalmars-d at puremagic.com> wrote:
>
>> On Thursday, 17 April 2014 at 12:39:59 UTC, Manu via 
>> Digitalmars-d wrote:
>>
>>> void f(void* ptr)
>>> {
>>>   // was ptr allocated with malloc, or new?
>>>
>>
>> Then what?
>>
>
> Whatever. inc/dec ref, or not. core.memory.addRoot/Range, or 
> not. That sort
> of thing.
>
> There's a persistent problem  when dealing with memory systems 
> in D that it
> must remain backward compatible with C and raw pointers, and 
> that creates
> complications.

Both NaCl and go-lang uses a trick to reserve a huge amount of 
continuos virtual memory...


More information about the Digitalmars-d mailing list