aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-08-22 12:20:15 -0700
committerElliott Hughes <enh@google.com>2018-08-22 12:20:15 -0700
commit9f251509c0ab9999f11a2439961f8ef1f034075b (patch)
tree5582baacdca2592252d948928125b965d1e6082d
parent3a6a856bba83bf55e30598596f46822a46a20805 (diff)
downloadjemalloc-9f251509c0ab9999f11a2439961f8ef1f034075b.tar.gz
bionic provides PR_SET_VMA now.android-o-mr1-iot-release-1.0.4
Bug: N/A Test: builds Change-Id: Idd5c63d26cdba56bdfd8080749d1320d481ef3fb
-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