diff options
| author | Jason Evans <jasone@canonware.com> | 2016-05-12 21:51:07 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2016-05-12 21:53:25 (GMT) |
| commit | f70a254d44c8d30af2cd5d30531fb18fdabaae6d (patch) | |
| tree | 4e226a1bd0d56d742ca0950f69829ed7f0216e62 /include/jemalloc/jemalloc_macros.h.in | |
| parent | e02b83cc5e3c4d30f93dba945162e3aa58d962d6 (diff) | |
| parent | 09f8585ce8a57baa387cc0327e51c0baffbdce6f (diff) | |
| download | jemalloc-4.2.0.zip jemalloc-4.2.0.tar.gz jemalloc-4.2.0.tar.bz2 | |
Merge branch 'dev'4.2.0
Diffstat (limited to 'include/jemalloc/jemalloc_macros.h.in')
| -rw-r--r-- | include/jemalloc/jemalloc_macros.h.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/jemalloc/jemalloc_macros.h.in b/include/jemalloc/jemalloc_macros.h.in index 9f356f9..129240e 100644 --- a/include/jemalloc/jemalloc_macros.h.in +++ b/include/jemalloc/jemalloc_macros.h.in @@ -13,11 +13,11 @@ # define MALLOCX_LG_ALIGN(la) ((int)(la)) # if LG_SIZEOF_PTR == 2 -# define MALLOCX_ALIGN(a) ((int)(ffs(a)-1)) +# define MALLOCX_ALIGN(a) ((int)(ffs((int)(a))-1)) # else # define MALLOCX_ALIGN(a) \ - ((int)(((a) < (size_t)INT_MAX) ? ffs((int)(a))-1 : \ - ffs((int)((a)>>32))+31)) + ((int)(((size_t)(a) < (size_t)INT_MAX) ? ffs((int)(a))-1 : \ + ffs((int)(((size_t)(a))>>32))+31)) # endif # define MALLOCX_ZERO ((int)0x40) /* @@ -29,7 +29,7 @@ /* * Bias arena index bits so that 0 encodes "use an automatically chosen arena". */ -# define MALLOCX_ARENA(a) ((int)(((a)+1) << 20)) +# define MALLOCX_ARENA(a) ((((int)(a))+1) << 20) #if defined(__cplusplus) && defined(JEMALLOC_USE_CXX_THROW) # define JEMALLOC_CXX_THROW throw() |
