-
Interface Summary Interface Description ChunkAllocI Instances of this interface may be set to theChunkHooksstruct.ChunkCommitI Instances of this interface may be set to theChunkHooksstruct.ChunkDallocI Instances of this interface may be set to theChunkHooksstruct.ChunkDecommitI Instances of this interface may be set to theChunkHooksstruct.ChunkMergeI Instances of this interface may be set to theChunkHooksstruct.ChunkPurgeI Instances of this interface may be set to theChunkHooksstruct.ChunkSplitI Instances of this interface may be set to theChunkHooksstruct.MallocMessageCallbackI Instances of this interface may be passed to themalloc_usable_sizemethod. -
Class Summary Class Description ChunkAlloc Instances of this class may be set to theChunkHooksstruct.ChunkCommit Instances of this class may be set to theChunkHooksstruct.ChunkDalloc Instances of this class may be set to theChunkHooksstruct.ChunkDecommit Instances of this class may be set to theChunkHooksstruct.ChunkHooks Comprises function pointers which are described individually below.ChunkHooks.Buffer An array ofChunkHooksstructs.ChunkMerge Instances of this class may be set to theChunkHooksstruct.ChunkPurge Instances of this class may be set to theChunkHooksstruct.ChunkSplit Instances of this class may be set to theChunkHooksstruct.JEmacros Macros for jemalloc.JEmalloc Native bindings to jemalloc.JEmalloc.Functions Contains the function pointers loaded from the jemallocSharedLibrary.MallocMessageCallback Instances of this class may be passed to themalloc_usable_sizemethod.
Package org.lwjgl.system.jemalloc Description
Contains bindings to the jemalloc library. jemalloc is a general purpose malloc implementation that
emphasizes fragmentation avoidance and scalable concurrency support.
The jemalloc documentation can be found here. The jemalloc wiki also contains useful information.
The jemalloc shared library that comes with LWJGL is configured with:
- --with-jemalloc-prefix=je_
- --with-malloc-conf=purge:decay
- --disable-stats
- --disable-fill
- --disable-zone-allocator (MacOS)
- --enable-lazy-lock=no (Windows)
The shared library may be replaced with a custom build that has more features enabled.
Dynamic configuration (for enabled features) is also possible, using either the MALLOC_CONF environment variable or the
MALLCTL NAMESPACE and the
mallctl* functions.