summaryrefslogtreecommitdiffstats
path: root/include/jemalloc
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-10-24 14:56:00 (GMT)
committerJason Evans <jasone@canonware.com>2015-10-24 14:56:00 (GMT)
commit91010a9e2ebfc84b1ac1ed7fdde3bfed4f65f180 (patch)
tree70f4f340b8e36bed4a1c418bfb312a1671ebf494 /include/jemalloc
parente9192eacf8935e29fc62fddc2701f7942b1cc02c (diff)
parentbe4134710669e8b09d6b928f72a4208e5a68187c (diff)
downloadjemalloc-4.0.4.zip
jemalloc-4.0.4.tar.gz
jemalloc-4.0.4.tar.bz2
Merge branch 'dev'4.0.4
Diffstat (limited to 'include/jemalloc')
-rw-r--r--include/jemalloc/internal/jemalloc_internal.h.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
index 8536a3e..654cd08 100644
--- a/include/jemalloc/internal/jemalloc_internal.h.in
+++ b/include/jemalloc/internal/jemalloc_internal.h.in
@@ -317,6 +317,10 @@ typedef unsigned szind_t;
#define PAGE ((size_t)(1U << LG_PAGE))
#define PAGE_MASK ((size_t)(PAGE - 1))
+/* Return the page base address for the page containing address a. */
+#define PAGE_ADDR2BASE(a) \
+ ((void *)((uintptr_t)(a) & ~PAGE_MASK))
+
/* Return the smallest pagesize multiple that is >= s. */
#define PAGE_CEILING(s) \
(((s) + PAGE_MASK) & ~PAGE_MASK)