mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 16:02:57 +00:00
The glibc calloc() function has an optimization to not explicitely memset() very large calloc allocations that just came from mmap(), because they are known to be zero. This could result in the perf memcpy benchmark reading only from the zero page, which gives unrealistic results. Always call memset explicitly on the source area to avoid this problem. Signed-off-by: Andi Kleen <[email protected]> Cc: Hitoshi Mitake <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>