aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-08-22 18:23:44 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-08-22 18:23:44 -0700
commitac98c4b71448747fcd35ca475ce977590e840cfe (patch)
tree5582baacdca2592252d948928125b965d1e6082d
parent3a6a856bba83bf55e30598596f46822a46a20805 (diff)
parent9f251509c0ab9999f11a2439961f8ef1f034075b (diff)
downloadjemalloc-ac98c4b71448747fcd35ca475ce977590e840cfe.tar.gz
bionic provides PR_SET_VMA now.
am: 9f251509c0 Change-Id: I231866d5b8ba6fc16dd0e5b52cdb01fb1da0113f
-rw-r--r--src/pages.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pages.c b/src/pages.c
index 44f82ee..9b26d61 100644
--- a/src/pages.c
+++ b/src/pages.c
@@ -20,10 +20,6 @@ static bool os_overcommits;
#if defined(__ANDROID__)
#include <sys/prctl.h>
-
-/* Definitions of prctl arguments to set a vma name in Android kernels. */
-#define ANDROID_PR_SET_VMA 0x53564d41
-#define ANDROID_PR_SET_VMA_ANON_NAME 0
#endif
/******************************************************************************/
@@ -70,7 +66,7 @@ pages_map(void *addr, size_t size, bool *commit)
#if defined(__ANDROID__)
if (ret != NULL) {
/* Name this memory as being used by libc */
- prctl(ANDROID_PR_SET_VMA, ANDROID_PR_SET_VMA_ANON_NAME, ret,
+ prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ret,
size, "libc_malloc");
}
#endif