manual memory management
Adam D. Ruppe
destructionator at gmail.com
Wed Jan 9 16:50:28 PST 2013
On Thursday, 10 January 2013 at 00:18:26 UTC, Walter Bright wrote:
> And that is not dereferencing null, it is dereferencing
> 0x1000000.
Yes, but it is worth noting that dmd will happily compile that
code, even if marked @safe - just because the pointer on the
language level is null doesn't mean it is memory safe at the
assembly level.
the generated code with @safe is still just what we'd expect too:
3: 31 c0 xor eax,eax
5: c7 80 00 00 10 00 0a mov DWORD PTR
[eax+0x100000],0xa
More information about the Digitalmars-d
mailing list