aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/bench
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-24 12:05:16 -0200
committerIngo Molnar <mingo@elte.hu>2009-11-24 16:37:02 +0100
commit364794845cbc49e638b83d7ef739524291e1e961 (patch)
treee720975b26d307d6566afb9305c9f6e44290a7da /tools/perf/bench
parentperf symbols: Simplify symbol machinery setup (diff)
downloadlinux-dev-364794845cbc49e638b83d7ef739524291e1e961.tar.xz
linux-dev-364794845cbc49e638b83d7ef739524291e1e961.zip
perf tools: Introduce zalloc() for the common calloc(1, N) case
This way we type less characters and it looks more like the kzalloc kernel counterpart. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1259071517-3242-3-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/bench')
-rw-r--r--tools/perf/bench/mem-memcpy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c
index 5165fd1d8d2c..89773178e894 100644
--- a/tools/perf/bench/mem-memcpy.c
+++ b/tools/perf/bench/mem-memcpy.c
@@ -127,11 +127,11 @@ int bench_mem_memcpy(int argc, const char **argv,
return 1;
}
- dst = calloc(length, sizeof(char));
+ dst = zalloc(length);
if (!dst)
die("memory allocation failed - maybe length is too large?\n");
- src = calloc(length, sizeof(char));
+ src = zalloc(length);
if (!src)
die("memory allocation failed - maybe length is too large?\n");