Using array slices with C-style fread() from file

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 21 13:12:06 PDT 2017


On 06/21/2017 12:20 PM, uncorroded wrote:

 > So @trusted is me guaranteeing to the compiler that this
 > function is safe?

Yes and you shouldn't lie. :)

 > Is there any way of auditing this code through
 > valgrind, etc.

That's a good idea, which you can do yourself but I don't think you can 
be sure beyond the tests that you've ran. There can always be corner 
cases where the library you use may not be memory-safe. You have to 
trust... :)

 > invaluable resource in getting me started.

Thank you! Makes me very happy to hear that. :)

Ali



More information about the Digitalmars-d-learn mailing list