Bug 1403843 - Disable static sizes on debug builds. r?njn draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 28 Sep 2017 15:15:23 +0900
changeset 672227 add4c4c2bfacc3d391742c59785c80cf2b4f410a
parent 672226 b4b4d6496518a902c9cfd49da4cb146cc2ff4b72
child 733755 fedb9bfa332b7fff5c92d5f5235aab3b756b0580
push id82197
push userbmo:mh+mozilla@glandium.org
push dateThu, 28 Sep 2017 22:57:36 +0000
reviewersnjn
bugs1403843
milestone58.0a1
Bug 1403843 - Disable static sizes on debug builds. r?njn Because why not, especially now that this only concerns the page size.
memory/build/mozjemalloc.cpp
--- a/memory/build/mozjemalloc.cpp
+++ b/memory/build/mozjemalloc.cpp
@@ -382,20 +382,23 @@ void *_mmap(void *addr, size_t length, i
 #define	RUN_MAX_OVRHD		0x0000003dU
 #define	RUN_MAX_OVRHD_RELAX	0x00001800U
 
 /*
  * When MALLOC_STATIC_PAGESIZE is defined, the page size is fixed at
  * compile-time for better performance, as opposed to determined at
  * runtime. Some platforms can have different page sizes at runtime
  * depending on kernel configuration, so they are opted out by default.
+ * Debug builds are opted out too, for test coverage.
  */
+#ifndef MOZ_DEBUG
 #if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__)
 #define MALLOC_STATIC_PAGESIZE 1
 #endif
+#endif
 
 /* Various quantum-related settings. */
 
 #define QUANTUM_DEFAULT  (size_t(1) << QUANTUM_2POW_MIN)
 static const size_t quantum = QUANTUM_DEFAULT;
 static const size_t quantum_mask = QUANTUM_DEFAULT - 1;
 
 /* Various bin-related settings. */