diff options
Diffstat (limited to 'tools/perf/bench/mem-memcpy.c')
-rw-r--r-- | tools/perf/bench/mem-memcpy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index 25fd3f1966f1..8cdca43016b2 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c | |||
@@ -117,6 +117,8 @@ static void alloc_mem(void **dst, void **src, size_t length) | |||
117 | *src = zalloc(length); | 117 | *src = zalloc(length); |
118 | if (!*src) | 118 | if (!*src) |
119 | die("memory allocation failed - maybe length is too large?\n"); | 119 | die("memory allocation failed - maybe length is too large?\n"); |
120 | /* Make sure to always replace the zero pages even if MMAP_THRESH is crossed */ | ||
121 | memset(*src, 0, length); | ||
120 | } | 122 | } |
121 | 123 | ||
122 | static u64 do_memcpy_cycle(memcpy_t fn, size_t len, bool prefault) | 124 | static u64 do_memcpy_cycle(memcpy_t fn, size_t len, bool prefault) |