summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/tools/perf/util/wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'ANDROID_3.4.5/tools/perf/util/wrapper.c')
-rw-r--r--ANDROID_3.4.5/tools/perf/util/wrapper.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/ANDROID_3.4.5/tools/perf/util/wrapper.c b/ANDROID_3.4.5/tools/perf/util/wrapper.c
deleted file mode 100644
index 73e900ed..00000000
--- a/ANDROID_3.4.5/tools/perf/util/wrapper.c
+++ /dev/null
@@ -1,40 +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 __used, int flag __used)
-{
-}
-
-char *xstrdup(const char *str)
-{
- char *ret = strdup(str);
- if (!ret) {
- release_pack_memory(strlen(str) + 1, -1);
- ret = strdup(str);
- if (!ret)
- die("Out of memory, strdup failed");
- }
- return ret;
-}
-
-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;
-}