Re: [PATCH 1/3] KVM: VMX: Use proper types to access const arrays

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

 



Il 27/06/2013 15:42, Mathias Krause ha scritto:
> > The "const int" is not particularly useful, but doesn't hurt either.
> 
> It's more of a hint for the compiler to take the values verbatim
> instead of allocating stack space for them. But it'll probably already
> do it even without that "hint".

It won't change anything really.  Maybe for "const int foo[]", but I'm
not even sure about that and it depends a lot on the circumstances (loop
unrolling, inlining, whether you ever store "foo" in a variable or pass
it as a parameter, ...).  The compiler may leave it on the stack anyway.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux