mirror of
https://github.com/matrix-construct/construct
synced 2025-02-16 16:50:12 +01:00
ircd::allocator::je: Add runtime query for linked library at initialization.
This commit is contained in:
parent
708bba4bf9
commit
aae7f7e545
2 changed files with 15 additions and 0 deletions
|
@ -46,6 +46,13 @@ namespace ircd::allocator
|
|||
bool trim(const size_t &pad = 0) noexcept; // malloc_trim(3)
|
||||
}
|
||||
|
||||
/// jemalloc specific suite; note that some of the primary ircd::allocator
|
||||
/// interface has different functionality when je::available.
|
||||
namespace ircd::allocator::je
|
||||
{
|
||||
extern const bool available;
|
||||
}
|
||||
|
||||
/// Valgrind memcheck hypercall suite
|
||||
/// note: definitions located in ircd/vg.cc
|
||||
namespace ircd::allocator::vg
|
||||
|
|
|
@ -53,6 +53,14 @@ ircd::allocator::je::malloc_version_abi
|
|||
"jemalloc", info::versions::ABI, //TODO: get this
|
||||
};
|
||||
|
||||
decltype(ircd::allocator::je::available)
|
||||
ircd::allocator::je::available
|
||||
{
|
||||
#if defined(IRCD_ALLOCATOR_JEMALLOC)
|
||||
mods::ldso::has("jemalloc")
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(IRCD_ALLOCATOR_JEMALLOC)
|
||||
bool
|
||||
ircd::allocator::trim(const size_t &pad)
|
||||
|
|
Loading…
Add table
Reference in a new issue