Decrease default chunk size from 4MB to 1MB.
This will lower the amount of wasted memory on processes that do not
allocate a lot of memory.
(cherry picked from commit 161ffd9daef31bb142f242fc83bd58662e07981f)
Change-Id: Idfb2d53119e468630c67a53c63b2a2742874dc8c
diff --git a/include/jemalloc/internal/chunk.h b/include/jemalloc/internal/chunk.h
index f3bfbe0..47bbccd 100644
--- a/include/jemalloc/internal/chunk.h
+++ b/include/jemalloc/internal/chunk.h
@@ -5,7 +5,11 @@
* Size and alignment of memory chunks that are allocated by the OS's virtual
* memory system.
*/
+#if defined(__ANDROID__)
+#define LG_CHUNK_DEFAULT 20
+#else
#define LG_CHUNK_DEFAULT 22
+#endif
/* Return the chunk address for allocation address a. */
#define CHUNK_ADDR2BASE(a) \