summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tim Murray <timmurray@google.com> 2018-10-15 16:29:15 -0700
committer Tim Murray <timmurray@google.com> 2018-10-18 23:30:35 +0000
commit64fee6148b6f77d11b9b799a68b66d67be851d7e (patch)
tree7c583d6c7a452c79852864dcd6291b6ab6edb7de
parent13d2b5f1ab8ffa5f0ac5480dd4cbcf06452b671b (diff)
hwui: purge malloc pages on bitmap destruction
Immediately purge malloc pages on bitmap destruction. Bitmaps are often big and can cause memory to stay high for much longer than it should. Test: boots and works bug 117795621 Merged-in: If2e8c5f1fc07039cf3dc3edcd3dc06861dbce1a1 Change-Id: If2e8c5f1fc07039cf3dc3edcd3dc06861dbce1a1
-rw-r--r--libs/hwui/hwui/Bitmap.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp
index 263d249d20e9..e7ffbee521ff 100644
--- a/libs/hwui/hwui/Bitmap.cpp
+++ b/libs/hwui/hwui/Bitmap.cpp
@@ -223,6 +223,7 @@ Bitmap::~Bitmap() {
break;
case PixelStorageType::Heap:
free(mPixelStorage.heap.address);
+ mallopt(M_PURGE, 0);
break;
case PixelStorageType::Hardware:
auto buffer = mPixelStorage.hardware.buffer;