aboutsummaryrefslogtreecommitdiff
path: root/include/jemalloc/internal/size_classes.sh
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2014-09-07 14:40:19 -0700
committerJason Evans <je@fb.com>2014-09-07 14:40:19 -0700
commitb718cf77e9917f6ae1995c2e2b219ff4219c9f46 (patch)
treed917a0cd167f15fc269ff2f0264a96663af1e280 /include/jemalloc/internal/size_classes.sh
parentc21b05ea09874222266b3e36ceb18765fcb4a00b (diff)
downloadjemalloc-b718cf77e9917f6ae1995c2e2b219ff4219c9f46.tar.gz
Optimize [nmd]alloc() fast paths.
Optimize [nmd]alloc() fast paths such that the (flags == 0) case is streamlined, flags decoding only happens to the minimum degree necessary, and no conditionals are repeated.
Diffstat (limited to 'include/jemalloc/internal/size_classes.sh')
-rwxr-xr-xinclude/jemalloc/internal/size_classes.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/jemalloc/internal/size_classes.sh b/include/jemalloc/internal/size_classes.sh
index 379d36c..0cfac72 100755
--- a/include/jemalloc/internal/size_classes.sh
+++ b/include/jemalloc/internal/size_classes.sh
@@ -202,6 +202,7 @@ cat <<EOF
* LG_TINY_MAXCLASS: Lg of maximum tiny size class.
* LOOKUP_MAXCLASS: Maximum size class included in lookup table.
* SMALL_MAXCLASS: Maximum small size class.
+ * LARGE_MINCLASS: Minimum large size class.
*/
#define LG_SIZE_CLASS_GROUP ${lg_g}
@@ -246,6 +247,8 @@ cat <<EOF
# error "Too many small size classes"
#endif
+#define LARGE_MINCLASS (PAGE_CEILING(SMALL_MAXCLASS+1))
+
#endif /* JEMALLOC_H_TYPES */
/******************************************************************************/
#ifdef JEMALLOC_H_STRUCTS