mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 08:03:32 +03:00
Add size class computation capability.
Add size class computation capability, currently used only as validation of the size class lookup tables. Generalize the size class spacing used for bins, for eventual use throughout the full range of allocation sizes.
This commit is contained in:
parent
99118622ff
commit
d04047cc29
9 changed files with 462 additions and 91 deletions
23
configure.ac
23
configure.ac
|
|
@ -1200,6 +1200,29 @@ if test "x${je_cv_atomic9}" != "xyes" -a "x${je_cv_osatomic}" != "xyes" ; then
|
|||
JE_SYNC_COMPARE_AND_SWAP_CHECK(64, 8)
|
||||
fi
|
||||
|
||||
dnl ============================================================================
|
||||
dnl Check for __builtin_clz() and __builtin_clzl().
|
||||
|
||||
AC_CACHE_CHECK([for __builtin_clz],
|
||||
[je_cv_builtin_clz],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||
[
|
||||
{
|
||||
unsigned x = 0;
|
||||
int y = __builtin_clz(x);
|
||||
}
|
||||
{
|
||||
unsigned long x = 0;
|
||||
int y = __builtin_clzl(x);
|
||||
}
|
||||
])],
|
||||
[je_cv_builtin_clz=yes],
|
||||
[je_cv_builtin_clz=no])])
|
||||
|
||||
if test "x${je_cv_builtin_clz}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_HAVE_BUILTIN_CLZ], [ ])
|
||||
fi
|
||||
|
||||
dnl ============================================================================
|
||||
dnl Check for spinlock(3) operations as provided on Darwin.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue