[fpc-pascal] readonly variables
micha at neli.hopto.org
Sun Nov 29 17:09:07 CET 2009
Anthony Walter wrote:
> Having said all that, Jonas, what is the actual implemented behaviour
> of FPC? Does it 0 initialize heap memory at startup or not? If not,
> what is the justification for not doing so when this has been a long
> established behaviour of Delphi?
It's not the compiler or RTL that zeroes the memory, but the OS.
Therefore, it cannot be guaranteed by the fpc documentation (except if
it would contain code to explicitly initialise that memory).
Most OSes (Windows, Linux, BSDs, ...) do zero global memory though, to
prevent leakage of (potentially security sensitive) information from one
process to another.
More information about the fpc-pascal