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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user