diff options
author | Jason Evans <je@fb.com> | 2012-05-02 08:22:16 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2012-05-02 08:22:16 (GMT) |
commit | 8d5865eb578e99369382d90bdd1e557e5b233277 (patch) | |
tree | 803ac47e87f0a9cae71e6175e9a4b24188260878 /include | |
parent | 203484e2ea267e068a68fd2922263f0ff1d5ac6f (diff) | |
download | jemalloc-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.in | 5 |
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. */ |