|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] page_alloc query
>>> Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> 07.03.07 09:27 >>>
>On 6/3/07 22:10, "Ben Thomas" <bthomas@xxxxxxxxxxxxxxx> wrote:
>
>> Why are the zones unsigned ints when they are used as indices ?
>> The ASSERTS do checks to keep you out of some amount of
>> trouble, but the loop appears to be able to get you quickly
>> into trouble by driving the index negative and with a check
>> that doesn't appear to be effective.
>
>This is already fixed in the staging tree.
Hmm, looking at that fix I doubt it helps - since zone_lo and zone_hi remain
unsigned, my understanding would be that the signed zone is converted to
unsigned before the comparison, hence nothing changes.
And I really think using signed variables for array indices is odd - it performs
worse on x86-64/ia64 at least (because of the extra sign extension, whereas
the zero extension is implied in most/some operations), and it certainly is
contrary to how arrays work (they don't normally have fields accessible with
negative indices).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|