Is it safe to read to memory after it has been allocated with `pureMalloc` and `pureRealloc`?
rempas
rempas at tutanota.com
Mon Apr 4 07:32:00 UTC 2022
In other terms, do these functions auto-initialize memory to be
ready for use? I test it out using `printf` to print a string.
"%s" expects for a null terminated string and it seems to work so
I suppose that these functions auto-initialize the bytes to `\0`.
However, memory is tricky and I still don't know how memory (and
virtual memory) works under the hood so it may just randomly work
and it may give me a segmentation fault at some point.
Does anyone knows what's going on here?
More information about the Digitalmars-d-learn
mailing list