Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdd7a7e5 authored by Richard Uhler's avatar Richard Uhler
Browse files

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
parent 5ed02df4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);