R
Richard Tobin
[/QUOTE]put the value in read-only memory, because there is no defined way to
modify it.
Around this point revolves my query.
What does this read-only memory mean here ?
What does it refer to ? Is it a portion of stack or heap or something
else ?
Where is it ?
Typically it would be a segment of memory marked as unwritable by the
operating system (as, for example, the program code usually is). The
operating system does this by setting some bit in thte page
descriptor, which is interpreted by the processor as meaning "don't
allow writes to this page".
In principle it could be some kind of ROM on an embedded system.
Both of these are only likely for const variables initialised to
compile-time constants, because otherwise it would have to make
the memory writable to store the constant value.
-- Richard