Loading...
--- libmalloc/libmalloc-317.100.9/src/thresholds.h
+++ libmalloc/libmalloc-646.0.13/src/thresholds.h
@@ -51,6 +51,11 @@
  * Tiny region size definitions; these are split into quanta of 16 bytes,
  * 64504 blocks is the magical value of how many quanta we can fit in a 1mb
  * region including the region trailer and metadata.
+ *
+ * XXX Although much of the tiny implementation handles (msize == 0) values as
+ * 65536, this configuration of NUM_TINY_BLOCKS makes that value impossible to
+ * reach.  That should be cleaned up, as it would greatly simplify msize
+ * handling.
  */
 #define SHIFT_TINY_QUANTUM 4ull
 #define SHIFT_TINY_CEIL_BLOCKS 16 // ceil(log2(NUM_TINY_BLOCKS))
@@ -96,6 +101,8 @@
 #define MEDIUM_CONDITIONAL_MADVISE_LIMIT (2 * 1024 * 1024)
 #define MEDIUM_MADVISE_SHIFT 4
 #define MEDIUM_MADVISE_MIN ((3 * 1024 * 1024) / 2) // 1.5 megabytes
+#define MEDIUM_MADVISE_DRAM_SCALE_DIVISOR (128ull * 1024 * 1024 * 1024) // 128GB
+
 
 /*
  * When performing a realloc() that must fallback to creating a new allocation