Merge "Add glibc alias for NT_PRFPREG"
diff --git a/libc/Android.mk b/libc/Android.mk
index 8ffaaf3..078e8c3 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -1161,11 +1161,14 @@
 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
 
 LOCAL_SHARED_LIBRARIES := libc libdl
-LOCAL_CXX_STL := none
-LOCAL_SYSTEM_SHARED_LIBRARIES :=
+ifeq ($(TARGET_ARCH),arm)
 # Only need this for arm since libc++ uses its own unwind code that
 # doesn't mix with the other default unwind code.
-LOCAL_STATIC_LIBRARIES_arm := libc++_static
+LOCAL_CXX_STL := libc++_static
+else
+LOCAL_CXX_STL := none
+endif
+LOCAL_SYSTEM_SHARED_LIBRARIES :=
 LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
 
 # Don't install on release build
diff --git a/libc/upstream-dlmalloc/malloc.c b/libc/upstream-dlmalloc/malloc.c
index 4362f49..3c9d36b 100644
--- a/libc/upstream-dlmalloc/malloc.c
+++ b/libc/upstream-dlmalloc/malloc.c
@@ -3526,7 +3526,9 @@
       nm.arena    = sum;
       nm.ordblks  = nfree;
       nm.hblkhd   = m->footprint - sum;
-      nm.usmblks  = m->max_footprint;
+      /* BEGIN android-changed: usmblks set to footprint from max_footprint */
+      nm.usmblks  = m->footprint;
+      /* END android-changed */
       nm.uordblks = m->footprint - mfree;
       nm.fordblks = mfree;
       nm.keepcost = m->topsize;