In jemalloc_internal_defs.h, sizeof(long) is always 4 on Windows no matter x86 or x64 is targeted. BTW, _WIN32 is defined for both x86 and x64 targets. So _WIN32 alone cannot be used to distinguish the target.