[vlc-devel] [PATCH] rand: implement a per-thread PCG random number generator for POSIX

Rémi Denis-Courmont remi at remlab.net
Sat Oct 21 08:23:50 CEST 2017


Le perjantaina 20. lokakuuta 2017, 23.36.27 EEST Yegor Timoshenko a écrit :
> PCG RNG has a lot of useful qualities that make it the best fit as of
> yet for VLC. It generates numbers of very high statistical quality,
> very fast, with very little code, and is not easily predictable. See:
> 
> http://www.pcg-random.org
> http://www.pcg-random.org/other-rngs.html
> 
> Now there's one RNG for each thread, instead of locking.
> 
> The next logical step would be to decouple platform-specific entropy
> sources (used for seeding) and RNG implementations, currently these
> two are intermingled in vlc_rand_bytes() function. Then it would be
> possible to use this RNG algorithm on other platforms.

I can´t see pthread_key_delete() anywhere, so there must be a leak still.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list