diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2016-05-10 07:48:01 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-10 16:58:27 +0200 |
commit | 452e84012595d681f254a3a0d733fb0b18ffaf42 (patch) | |
tree | f601c801233d33d531f6f831fdfabb8b80344e01 /tools/perf/util/wrapper.c | |
parent | perf help: Do not use ALLOC_GROW in add_cmd_list (diff) | |
download | linux-452e84012595d681f254a3a0d733fb0b18ffaf42.tar.xz linux-452e84012595d681f254a3a0d733fb0b18ffaf42.zip |
perf tools: Remove xrealloc and ALLOC_GROW
Remove unused xrealloc() and ALLOC_GROW() from libperf.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160510054801.6158.6204.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | tools/perf/util/wrapper.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/perf/util/wrapper.c b/tools/perf/util/wrapper.c deleted file mode 100644 index 5f1a07c4b87b..000000000000 --- a/tools/perf/util/wrapper.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Various trivial helper wrappers around standard functions - */ -#include "cache.h" - -/* - * There's no pack memory to release - but stay close to the Git - * version so wrap this away: - */ -static inline void release_pack_memory(size_t size __maybe_unused, - int flag __maybe_unused) -{ -} - -void *xrealloc(void *ptr, size_t size) -{ - void *ret = realloc(ptr, size); - if (!ret && !size) - ret = realloc(ptr, 1); - if (!ret) { - release_pack_memory(size, -1); - ret = realloc(ptr, size); - if (!ret && !size) - ret = realloc(ptr, 1); - if (!ret) - die("Out of memory, realloc failed"); - } - return ret; -} |