aboutsummaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/bitmap.h
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-04-06 11:54:44 -0700
committerJason Evans <jasone@canonware.com>2016-04-11 02:35:00 -0700
commit245ae6036c09cc11a72fab4335495d95cddd5beb (patch)
tree675007737fcc682ab3929c66f1a590e7ed144c23 /include/jemalloc/internal/bitmap.h
parent96aa67aca89725f0b1df3257421a3d0a48eb2700 (diff)
downloadplatform_external_jemalloc_new-245ae6036c09cc11a72fab4335495d95cddd5beb.tar.gz
platform_external_jemalloc_new-245ae6036c09cc11a72fab4335495d95cddd5beb.tar.bz2
platform_external_jemalloc_new-245ae6036c09cc11a72fab4335495d95cddd5beb.zip
Support --with-lg-page values larger than actual page size.
During over-allocation in preparation for creating aligned mappings, allocate one more page than necessary if PAGE is the actual page size, so that trimming still succeeds even if the system returns a mapping that has less than PAGE alignment. This allows compiling with e.g. 64 KiB "pages" on systems that actually use 4 KiB pages. Note that for e.g. --with-lg-page=21, it is also necessary to increase the chunk size (e.g. --with-malloc-conf=lg_chunk:22) so that there are at least two "pages" per chunk. In practice this isn't a particularly compelling configuration because so much (unusable) virtual memory is dedicated to chunk headers.
Diffstat (limited to 'include/jemalloc/internal/bitmap.h')
-rw-r--r--include/jemalloc/internal/bitmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/jemalloc/internal/bitmap.h b/include/jemalloc/internal/bitmap.h
index 894695f4..36f38b59 100644
--- a/include/jemalloc/internal/bitmap.h
+++ b/include/jemalloc/internal/bitmap.h
@@ -17,8 +17,8 @@ typedef unsigned long bitmap_t;
/*
* Do some analysis on how big the bitmap is before we use a tree. For a brute
- * force linear search, if we would have to call ffsl more than 2^3 times, use a
- * tree instead.
+ * force linear search, if we would have to call ffs_lu() more than 2^3 times,
+ * use a tree instead.
*/
#if LG_BITMAP_MAXBITS - LG_BITMAP_GROUP_NBITS > 3
# define USE_TREE