Use ffsl() in ALLOCM_ALIGN().
Use ffsl() rather than ffs() plus bitshifting in ALLOCM_ALIGN(). The original rational for using ffs() was portability, but the bitmap code has since induced a hard dependency on ffsl().
This commit is contained in:
parent
4eeb52f080
commit
722b370399
@ -4,7 +4,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
#define JEMALLOC_VERSION "@jemalloc_version@"
|
#define JEMALLOC_VERSION "@jemalloc_version@"
|
||||||
@ -18,11 +17,7 @@ extern "C" {
|
|||||||
|
|
||||||
#ifdef JEMALLOC_EXPERIMENTAL
|
#ifdef JEMALLOC_EXPERIMENTAL
|
||||||
#define ALLOCM_LG_ALIGN(la) (la)
|
#define ALLOCM_LG_ALIGN(la) (la)
|
||||||
#if LG_SIZEOF_PTR == 2
|
#define ALLOCM_ALIGN(a) (ffsl(a)-1)
|
||||||
#define ALLOCM_ALIGN(a) (ffs(a)-1)
|
|
||||||
#else
|
|
||||||
#define ALLOCM_ALIGN(a) ((a < (size_t)INT_MAX) ? ffs(a)-1 : ffs(a>>32)+31)
|
|
||||||
#endif
|
|
||||||
#define ALLOCM_ZERO ((int)0x40)
|
#define ALLOCM_ZERO ((int)0x40)
|
||||||
#define ALLOCM_NO_MOVE ((int)0x80)
|
#define ALLOCM_NO_MOVE ((int)0x80)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user