diff options
author | Richard Uhler <ruhler@google.com> | 2018-09-14 09:39:28 +0100 |
---|---|---|
committer | Richard Uhler <ruhler@google.com> | 2018-09-14 10:07:20 +0100 |
commit | fdd7a7e5b5daf82c28abef5a266ea24e4eb1b04f (patch) | |
tree | 87561909d8d99c3d665e2a53f1922f47c4688f16 /native/webview/loader/loader.cpp | |
parent | 5ed02df4df31373d7ff7c7deb9686f9508c031df (diff) |
Label the libwebview address space reservation.
So it shows up in showmaps output as "[anon:libwebview reservation]"
instead of grouped in with the rest of "[anon]", to facilitate memory
debugging.
Test: Manually confirm libwebview reservation shows up in system server showmap.
Change-Id: I4897aff4406265a7be9fc37aecbe5967bcf29426
Diffstat (limited to 'native/webview/loader/loader.cpp')
-rw-r--r-- | native/webview/loader/loader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/native/webview/loader/loader.cpp b/native/webview/loader/loader.cpp index adb371dde0fc..d0b47542f690 100644 --- a/native/webview/loader/loader.cpp +++ b/native/webview/loader/loader.cpp @@ -26,6 +26,7 @@ #include <string.h> #include <unistd.h> #include <sys/mman.h> +#include <sys/prctl.h> #include <sys/stat.h> #include <sys/types.h> @@ -58,6 +59,7 @@ jboolean DoReserveAddressSpace(jlong size) { vsize, strerror(errno)); return JNI_FALSE; } + prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, addr, vsize, "libwebview reservation"); gReservedAddress = addr; gReservedSize = vsize; ALOGV("Reserved %zd bytes at %p", vsize, addr); |