How to check a struct exists at a particular memory address?

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 18 13:20:47 PDT 2017


This might be a really silly question but:

I've allocated some memory like this (Foo is a struct):

     this._data = cast(Foo*) calloc(n, Foo.sizeof);

How can I then later check that there is a valid Foo at 
`this._data` or `this._data + n`?


More information about the Digitalmars-d-learn mailing list