summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2012-05-02 08:22:16 (GMT)
committerJason Evans <je@fb.com>2012-05-02 08:22:16 (GMT)
commit8d5865eb578e99369382d90bdd1e557e5b233277 (patch)
tree803ac47e87f0a9cae71e6175e9a4b24188260878 /include
parent203484e2ea267e068a68fd2922263f0ff1d5ac6f (diff)
downloadjemalloc-8d5865eb578e99369382d90bdd1e557e5b233277.zip
jemalloc-8d5865eb578e99369382d90bdd1e557e5b233277.tar.gz
jemalloc-8d5865eb578e99369382d90bdd1e557e5b233277.tar.bz2
Make CACHELINE a raw constant.
Make CACHELINE a raw constant in order to work around a __declspec(align()) limitation. Submitted by Mike Hommey.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/jemalloc_internal.h.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
index ccecfaa..e441285 100644
--- a/include/jemalloc/internal/jemalloc_internal.h.in
+++ b/include/jemalloc/internal/jemalloc_internal.h.in
@@ -307,9 +307,12 @@ static const bool config_ivsalloc =
/*
* Maximum size of L1 cache line. This is used to avoid cache line aliasing.
* In addition, this controls the spacing of cacheline-spaced size classes.
+ *
+ * CACHELINE cannot be based on LG_CACHELINE because __declspec(align()) can
+ * only handle raw constants.
*/
#define LG_CACHELINE 6
-#define CACHELINE ((size_t)(1U << LG_CACHELINE))
+#define CACHELINE 64
#define CACHELINE_MASK (CACHELINE - 1)
/* Return the smallest cacheline multiple that is >= s. */