[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] VMStateField arrays: shouldn't they be const?

From: Reimar Döffinger
Subject: [Qemu-devel] VMStateField arrays: shouldn't they be const?
Date: Thu, 5 Nov 2009 15:57:23 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

with the VMState patches there are now a lot of lines like these:
>    .fields      = (VMStateField []) {
Am I missing something or should those actually be const, i.e.
>    .fields      = (const VMStateField []) {
Last time I looked into it, gcc was unable to take the hint, but
e.g. the Intel compiler puts the data then into .rodata instead of .data.
While I don't know where the different OSes are in actually supporting
it, having it in .rodata means it can't be (accidentally or intentionally)
manipulated at runtime, shared between processes and swapped out to the
binary instead of the swapfile (or for some architectures with in-place
execution support it does not even need to be read from "disk", though I
doubt those matter for qemu).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]