mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-19 08:51:22 +03:00
Make CACHELINE a raw constant.
Make CACHELINE a raw constant in order to work around a __declspec(align()) limitation. Submitted by Mike Hommey.
This commit is contained in:
parent
203484e2ea
commit
8d5865eb57
1 changed files with 4 additions and 1 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue