summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2019-07-23Enable opt.retain by default on Windows.Qi Wang
2019-04-23configure.ac: Add an option to disable docFabrice Fontaine
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-04-15Move extra size checks behind a config flag.David Goldblatt
This will let us turn that flag into a generic "turn on runtime checks" flag that guards other functionality we have planned.
2019-04-15Add an autoconf feature test for format_arg and a jemalloc-specificzoulasc
macro for it.
2019-03-09Detect if 8-bit atomics are available.Qi Wang
In some rare cases (older compiler, e.g. gcc 4.2 w/ MIPS), 8-bit atomics might be unavailable. Detect such cases so that we can workaround.
2019-03-04Fix a syntax error in configure.acQi Wang
Introduced in e13400c919e6b6730284ff011875bbcdd6821f1c.
2019-02-22Remove JE_FORCE_SYNC_COMPARE_AND_SWAP_[48].Jason Evans
These macros have been unused since d4ac7582f32f506d5203bea2f0115076202add38 (Introduce a backport of C11 atomics).
2019-02-08Add build_doc by default.Qi Wang
However, skip building the docs (and output warnings) if XML support is missing. This allows `make install` to succeed w/o `make dist`.
2019-02-06Make background_thread not dependent on libdl.Qi Wang
When not using libdl, still allows background_thread to be enabled.
2019-02-06Add configure option --disable-libdl.Qi Wang
This makes it possible to build full static binary.
2019-02-01Sanity check szind on tcache flush.Qi Wang
This adds some overhead to the tcache flush path (which is one of the popular paths). Guard it behind a config option.
2019-01-09Replace -lpthread with -pthreadFaidon Liambotis
This automatically adds -latomic if and when needed, e.g. on riscv64 systems. Fixes #1401.
2018-12-19Add --{enable,disable}-{static,shared} to configure scriptJohn Ericson
My distro offers a custom toolchain where it's not possible to make static libs, so it's insufficient to just delete the libs I don't want. I actually need to avoid building them in the first place.
2018-11-14Deprecate OSSpinLock.Qi Wang
2018-11-14Add a fastpath for arena_slab_reg_alloc_batchDave Watson
Also adds a configure.ac check for __builtin_popcount, which is used in the new fastpath.
2018-10-17Make `smallocx` symbol name depend on the `JEMALLOC_VERSION_GID`gnzlbg
This comments concatenates the `JEMALLOC_VERSION_GID` to the `smallocx` symbol name, such that the symbol ends up exported as `smallocx_{git_hash}`.
2018-10-17Add experimental API: smallocx_return_t smallocx(size, flags)gnzlbg
--- Motivation: This new experimental memory-allocaction API returns a pointer to the allocation as well as the usable size of the allocated memory region. The `s` in `smallocx` stands for `sized`-`mallocx`, attempting to convey that this API returns the size of the allocated memory region. It should allow C++ P0901r0 [0] and Rust Alloc::alloc_excess to make use of it. The main purpose of these APIs is to improve telemetry. It is more accurate to register `smallocx(size, flags)` than `smallocx(nallocx(size), flags)`, for example. The latter will always line up perfectly with the existing size classes, causing a loss of telemetry information about the internal fragmentation induced by potentially poor size-classes choices. Instrumenting `nallocx` does not help much since user code can cache its result and use it repeatedly. --- Implementation: The implementation adds a new `usize` option to `static_opts_s` and an `usize` variable to `dynamic_opts_s`. These are then used to cache the result of `sz_index2size` and similar functions in the code paths in which they are unconditionally invoked. In the code-paths in which these functions are not unconditionally invoked, `smallocx` calls, as opposed to `mallocx`, these functions explicitly. --- [0]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0901r0.html
2018-08-03Allow the use of readlinkat over readlink.David Goldblatt
This can be useful in situations where readlink is disallowed.
2018-07-12Remove the --with-lg-page-sizes configure option.David Goldblatt
This appears to be unused.
2018-07-12Kill size_classes.sh.David Goldblatt
We've moved size class computations to boot time; they were being used only to check that the computations resulted in equal values.
2018-07-09Clean compilation -Wextragnzlbg
Before this commit jemalloc produced many warnings when compiled with -Wextra with both Clang and GCC. This commit fixes the issues raised by these warnings or suppresses them if they were spurious at least for the Clang and GCC versions covered by CI. This commit: * adds `JEMALLOC_DIAGNOSTIC` macros: `JEMALLOC_DIAGNOSTIC_{PUSH,POP}` are used to modify the stack of enabled diagnostics. The `JEMALLOC_DIAGNOSTIC_IGNORE_...` macros are used to ignore a concrete diagnostic. * adds `JEMALLOC_FALLTHROUGH` macro to explicitly state that falling through `case` labels in a `switch` statement is intended * Removes all UNUSED annotations on function parameters. The warning -Wunused-parameter is now disabled globally in `jemalloc_internal_macros.h` for all translation units that include that header. It is never re-enabled since that header cannot be included by users. * locally suppresses some -Wextra diagnostics: * `-Wmissing-field-initializer` is buggy in older Clang and GCC versions, where it does not understanding that, in C, `= {0}` is a common C idiom to initialize a struct to zero * `-Wtype-bounds` is suppressed in a particular situation where a generic macro, used in multiple different places, compares an unsigned integer for smaller than zero, which is always true. * `-Walloc-larger-than-size=` diagnostics warn when an allocation function is called with a size that is too large (out-of-range). These are suppressed in the parts of the tests where `jemalloc` explicitly does this to test that the allocation functions fail properly. * adds a new CI build bot that runs the log unit test on CI. Closes #1196 .
2018-05-04configure: Add --with-lg-vaddr configure option.Christoph Muellner
This patch allows to override the lg-vaddr values, which are defined by the build machine's CPUID information (x86_64) or default values (other architectures like aarch64). Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2018-04-30aarch64: Add ILP32 support.Christoph Muellner
Instead of setting a fix value of 48 allowed VA bits, we distiguish between LP64 and ILP32. Testsuite result with LP64: Test suite summary: pass: 13/13, skip: 0/13, fail: 0/13 Testsuit result with ILP32: Test suite summary: pass: 13/13, skip: 0/13, fail: 0/13 Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-04-17Add the --disable-initial-exec-tls configure option.David Goldblatt
Right now we always make our TLS use the initial-exec model if the compiler supports it. This change allows configure-time disabling of this setting, which can be helpful when dynamically loading jemalloc is the only option.
2018-04-11Fix a typo.Qi Wang
2018-03-08Remove config.thp which wasn't in use.Qi Wang
2018-01-10Modify configure to determine return value of strerror_r.Christopher Ferris
On glibc and Android's bionic, strerror_r returns char* when _GNU_SOURCE is defined. Add a configure check for this rather than assume glibc is the only libc that behaves this way.
2018-01-04Make sure JE_CXXFLAGS_ADD uses CPP compilerNehal J Wani
All the invocations of AC_COMPILE_IFELSE inside JE_CXXFLAGS_ADD were running 'the compiler and compilation flags of the current language' which was always the C compiler and the CXXFLAGS were never being tested against a C++ compiler. This patch fixes this issue by temporarily changing the chosen compiler to C++ by pushing it over the stack and popping it immediately after the compilation check.
2018-01-04Disable JEMALLOC_HAVE_MADVISE_HUGE for arm* CPUs.marxin
2017-10-16Add configure-time detection for madvise(..., MADV_DO[NT]DUMP)David Goldblatt
2017-10-11Remove the default value for JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS.Qi Wang
2017-10-11Define MADV_FREE on our own when needed.Qi Wang
On x86 Linux, we define our own MADV_FREE if madvise(2) is available, but no MADV_FREE is detected. This allows the feature to be built in and enabled with runtime detection.
2017-10-04Power: disable the CPU_SPINWAIT macro.David Goldblatt
Quoting from https://github.com/jemalloc/jemalloc/issues/761 : [...] reading the Power ISA documentation[1], the assembly in [the CPU_SPINWAIT macro] isn't correct anyway (as @marxin points out): the setting of the program-priority register is "sticky", and we never undo the lowering. We could do something similar, but given that we don't have testing here in the first place, I'm inclined to simply not try. I'll put something up reverting the problematic commit tomorrow. [1] Book II, chapter 3 of the 2.07B or 3.0B ISA documents.
2017-09-21dumpbin doesn't exist in mingwTamir Duberstein
2017-09-21Allow toolchain to determine nmTamir Duberstein
2017-09-21whitespaceTamir Duberstein
2017-08-11Fix support for GNU/kFreeBSDFaidon Liambotis
The configure.ac seciton right now is the same for Linux and kFreeBSD, which results into an incorrect configuration of e.g. defining JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY instead of FreeBSD's JEMALLOC_SYSCTL_VM_OVERCOMMIT. GNU/kFreeBSD is really a glibc + FreeBSD kernel system, so it needs its own entry which has a mixture of configuration options from Linux and FreeBSD.
2017-08-11Implement opt.metadata_thpQi Wang
This option enables transparent huge page for base allocators (require MADV_HUGEPAGE support).
2017-07-22Logging: allow logging with empty varargs.David Goldblatt
Currently, the log macro requires at least one argument after the format string, because of the way the preprocessor handles varargs macros. We can hide some of that irritation by pushing the extra arguments into a varargs function.
2017-07-20Add a logging facility.David T. Goldblatt
This sets up a hierarchical logging facility, so that we can add logging statements liberally, and turn them on in a fine-grained manner.
2017-06-29Enforce minimum autoconf version (currently 2.68).Jason Evans
This resolves #912.
2017-06-28Make sure LG_PAGE <= LG_HUGEPAGE.Jason Evans
This resolves #883.
2017-06-23Add thread name for background threads.Qi Wang
2017-06-08Normalize background thread configuration.Jason Evans
Also fix a compilation error #ifndef JEMALLOC_PTHREAD_CREATE_WRAPPER.
2017-05-30Add jemalloc prefix to allocator functions pruned by jeprof.Jason Evans
This resolves #507.
2017-05-30Add the --disable-thp option to support cross compiling.Jason Evans
This resolves #669.
2017-05-23Implementing opt.background_thread.Qi Wang
Added opt.background_thread to enable background threads, which handles purging currently. When enabled, decay ticks will not trigger purging (which will be left to the background threads). We limit the max number of threads to NCPUs. When percpu arena is enabled, set CPU affinity for the background threads as well. The sleep interval of background threads is dynamic and determined by computing number of pages to purge in the future (based on backlog).
2017-05-11Automatically generate private symbol name mangling macros.Jason Evans
Rather than using a manually maintained list of internal symbols to drive name mangling, add a compilation phase to automatically extract the list of internal symbols. This resolves #677.
2017-05-11Remove unused private_unnamespace infrastructure.Jason Evans
2017-05-03Add --with-version=VERSION .Jason Evans
This simplifies configuration when embedding a jemalloc release into another project's git repository. This resolves #811.