Struct with default ctor (Was: [dmd-beta] dmd 2.064 beta take 2)

Walter Bright newshound2 at digitalmars.com
Sun May 19 13:40:20 PDT 2013


On 5/19/2013 1:08 PM, Mr. Anonymous wrote:
> On Sunday, 19 May 2013 at 20:03:24 UTC, Andrei Alexandrescu wrote:
>> Well you got to do what you got to do. Field accesses for objects larger than
>> 4KB would have to be checked in @safe code.
>
> Isn't the solution as easy as doing:
> OR PTR:[address], 0
> the same way it's done for the stack?
>
> The offset it known at compile time in most cases, so the command would be
> required only if both:
> * The object is larger than target OS' guard page size.
> * The position is greater than target OS' guard page size, OR is unknown at
> compile time.

Not a bad idea.


More information about the Digitalmars-d mailing list