Re: mm: reorganize SLAB freelist randomization

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

 



Thanks a lot for running static checkers on the code.

On Mon, Jun 6, 2016 at 1:11 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> On Mon, Jun 06, 2016 at 01:01:45PM -0700, Thomas Garnier wrote:
>> No, the for loop is correct. Fisher-Yates shuffles algorithm is as follow:
>>
>> -- To shuffle an array a of n elements (indices 0..n-1):
>> for i from n−1 downto 1 do
>>      j random integer such that 0 <= j <= i
>>      exchange a[j] and a[i]
>>
>> https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
>
> Thanks for looking at this.  :)
>
> regards,
> dan carpenter
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]