Tail pad optimization, cache friendlyness and C++ interrop

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 17 15:08:29 PDT 2014


On 6/17/2014 2:50 PM, "Ola Fosheim Grøstad" 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> Out of curiosity, what is "memory safety" defined to be?

http://en.wikipedia.org/wiki/Memory_safety


> Does it include running out of stack?

Depends. If the stack has protection against stack overflow, then it is memory 
safe. If not, it is not memory safe. A guard page is an example of the former, 
but D's fibers suffer from the latter.


> Then just define the undefined behaviour as yielding the integer result of a
> unspecified black box function of the input. Integer overflow should yield the
> same value for the same operands on all ALUs. I don't understand how this
> relates to memory safety?

Exactly - offer an improved wording rather than just throwing up hands.


More information about the Digitalmars-d mailing list