[PATCH 7/7] Add support for MSVC

Jason Evans jasone at canonware.com
Wed May 2 01:26:59 PDT 2012


On May 2, 2012, at 12:21 AM, Mike Hommey wrote:
> Thanks for applying the MSVC patches. When applying this one, you left
> out the following hunk:
> 
>> @@ -296,7 +309,7 @@ static const bool config_ivsalloc =
>>  * In addition, this controls the spacing of cacheline-spaced size classes.
>>  */
>> #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. */
> 
> This wasn't a mistake that slipped in there. It is meant to be changed,
> and there's unfortunately no other way: __declspec(align()) only takes
> constants. Not calculated constants.

Okay, I just pushed another patch that adds this change, with a comment that explains why it is needed.

Thanks,
Jason


More information about the jemalloc-discuss mailing list