jemalloc is a general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support. jemalloc first came into use as the FreeBSD libc allocator in 2005, and since then it has found its way into numerous applications that rely on its predictable behavior. In 2010 jemalloc development efforts broadened to include developer support features such as heap profiling, Valgrind integration, and extensive monitoring/tuning hooks. Modern jemalloc releases continue to be integrated back into FreeBSD, and therefore versatility remains critical. Ongoing development efforts trend toward making jemalloc among the best allocators for a broad range of demanding applications, and eliminating/mitigating weaknesses that have practical repercussions for real world applications.
| Modifier and Type | Class and Description |
|---|---|
| public static class | JEmalloc.
Contains the function pointers loaded from the jemalloc |
| Modifier and Type | Field and Description |
|---|---|
| private static final SharedLibrary | |
| public static final String | JEMALLOC_VERSION
The version string. |
| public static final int | JEMALLOC_VERSION_BUGFIX
The bugfix version. |
| public static final String | JEMALLOC_VERSION_GID
The globally unique identifier (git commit hash). |
| public static final int | JEMALLOC_VERSION_MAJOR
The major version. |
| public static final int | JEMALLOC_VERSION_MINOR
The minor version. |
| public static final int | JEMALLOC_VERSION_NREV
The revision number. |
| public static final int | MALLCTL_ARENAS_ALL
Use as arena index in "arena. |
| public static final int | MALLCTL_ARENAS_DESTROYED
Use as arena index in "stats.arenas. |
| public static final int | MALLOCX_TCACHE_NONE
Do not use a thread-specific cache (tcache). |
| public static final int | MALLOCX_ZERO
Initialize newly allocated memory to contain zero bytes. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static SharedLibrary | |
| public static ByteBuffer | je_aligned_alloc(long
the allocation alignment, in bytes alignment, long the number of bytes to allocate size)Allocates |
| public static ByteBuffer | je_calloc(long
the number of objects to allocate num, long the size of each object, in bytes size)Allocates space for |
| public static void | je_dallocx(ByteBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosCauses the memory referenced by |
| public static void | je_dallocx(ShortBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosCauses the memory referenced by |
| public static void | je_dallocx(IntBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosCauses the memory referenced by |
| public static void | je_dallocx(LongBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosCauses the memory referenced by |
| public static void | je_dallocx(FloatBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosCauses the memory referenced by |
| public static void | je_dallocx(DoubleBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosCauses the memory referenced by |
| public static void | je_dallocx(PointerBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosCauses the memory referenced by |
| public static void | je_free(ByteBuffer
the allocated memory to free ptr)Causes the allocated memory referenced by |
| public static void | je_free(ShortBuffer
the allocated memory to free ptr)Causes the allocated memory referenced by |
| public static void | |
| public static void | je_free(LongBuffer
the allocated memory to free ptr)Causes the allocated memory referenced by |
| public static void | je_free(FloatBuffer
the allocated memory to free ptr)Causes the allocated memory referenced by |
| public static void | je_free(DoubleBuffer
the allocated memory to free ptr)Causes the allocated memory referenced by |
| public static void | je_free(PointerBuffer
the allocated memory to free ptr)Causes the allocated memory referenced by |
| public static void | je_free_aligned_sized(ByteBuffer ptr, long alignment)
The |
| public static void | je_free_aligned_sized(ShortBuffer ptr, long alignment)
The |
| public static void | je_free_aligned_sized(IntBuffer ptr, long alignment)
The |
| public static void | je_free_aligned_sized(LongBuffer ptr, long alignment)
The |
| public static void | je_free_aligned_sized(FloatBuffer ptr, long alignment)
The |
| public static void | je_free_aligned_sized(DoubleBuffer ptr, long alignment)
The |
| public static void | je_free_aligned_sized(PointerBuffer ptr, long alignment)
The |
| public static void | je_free_sized(ByteBuffer ptr)
The |
| public static void | je_free_sized(ShortBuffer ptr)
The |
| public static void | je_free_sized(IntBuffer ptr)
The |
| public static void | je_free_sized(LongBuffer ptr)
The |
| public static void | je_free_sized(FloatBuffer ptr)
The |
| public static void | je_free_sized(DoubleBuffer ptr)
The |
| public static void | je_free_sized(PointerBuffer ptr)
The |
| public static int | je_mallctl(ByteBuffer
the namespace location name, ByteBuffer returns a value oldp, PointerBuffer returns the value length oldlenp, ByteBuffer the new value newp)Provides a general interface for introspecting the memory allocator, as well as setting modifiable parameters and triggering actions. |
| public static int | je_mallctl(CharSequence
the namespace location name, ByteBuffer returns a value oldp, PointerBuffer returns the value length oldlenp, ByteBuffer the new value newp)Provides a general interface for introspecting the memory allocator, as well as setting modifiable parameters and triggering actions. |
| public static int | je_mallctlbymib(PointerBuffer
a MIB mib, ByteBuffer returns a value oldp, PointerBuffer returns the value length oldlenp, ByteBuffer the new value newp)Similar to |
| public static int | je_mallctlnametomib(ByteBuffer
the namespace location name, PointerBuffer an array of integers mibp, PointerBuffer the number of components in miblenp)mibpProvides a way to avoid repeated name lookups for applications that repeatedly query the same portion of the namespace, by translating a name to a
“Management Information Base” (MIB) that can be passed repeatedly to |
| public static int | je_mallctlnametomib(CharSequence
the namespace location name, PointerBuffer an array of integers mibp, PointerBuffer the number of components in miblenp)mibpProvides a way to avoid repeated name lookups for applications that repeatedly query the same portion of the namespace, by translating a name to a
“Management Information Base” (MIB) that can be passed repeatedly to |
| public static ByteBuffer | |
| public static PointerBuffer | |
| public static void | je_malloc_stats_print(MallocMessageCallbackI
the print callback, or write_cb, long NULL to use malloc_message()an opaque pointer that will be passed to cbopaque, ByteBuffer write_cban options string opts)Writes human-readable summary statistics via the |
| public static void | je_malloc_stats_print(MallocMessageCallbackI
the print callback, or write_cb, long NULL to use malloc_message()an opaque pointer that will be passed to cbopaque, CharSequence write_cban options string opts)Writes human-readable summary statistics via the |
| public static long | je_malloc_usable_size(ByteBuffer
the allocated memory to query ptr)Returns the usable size of the allocation pointed to by |
| public static ByteBuffer | je_mallocx(long
the number of bytes to allocate size, int a bitfield of zero or more of the flags)MALLOCX macrosAllocates at least |
| public static ByteBuffer | je_nallocx(long
the number of bytes to allocate size, int a bitfield of zero or more of the flags)MALLOCX macrosAllocates no memory, but it performs the same size computation as the |
| public static int | je_posix_memalign(PointerBuffer
returns the allocated memory memptr, long the allocation alignment, in bytes alignment, long the number of bytes to allocate size)Allocates |
| public static ByteBuffer | je_rallocx(ByteBuffer
the previously allocated memory or ptr, long NULLthe number of bytes to allocate size, int a bitfield of zero or more of the flags)MALLOCX macrosResizes the allocation at |
| public static ByteBuffer | je_realloc(ByteBuffer
the previously allocated memory or ptr, long NULLthe number of bytes to allocate size)Changes the size of the previously allocated memory referenced by |
| public static long | je_sallocx(ByteBuffer
the allocated memory to query ptr, int a bitfield of zero or more of the flags)MALLOCX macrosReturns the real size of the allocation at |
| public static void | je_sdallocx(ByteBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosSized version of |
| public static void | je_sdallocx(ShortBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosSized version of |
| public static void | je_sdallocx(IntBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosSized version of |
| public static void | je_sdallocx(LongBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosSized version of |
| public static void | je_sdallocx(FloatBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosSized version of |
| public static void | je_sdallocx(DoubleBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosSized version of |
| public static void | je_sdallocx(PointerBuffer
the allocated memory to deallocate ptr, int a bitfield of zero or more of the flags)MALLOCX macrosSized version of |
| public static long | je_xallocx(ByteBuffer
the previously allocated memory or ptr, long NULLthe number of bytes to allocate size, long the number of extra bytes to allocate extra, int a bitfield of zero or more of the flags)MALLOCX macrosResizes the allocation at |
| public static int | MALLOCX_ALIGN(int
the alignment a)Align the memory allocation to start at an address that is a multiple of |
| public static int | MALLOCX_ARENA(int
the arena index a)Use the arena specified by the index |
| public static int | MALLOCX_LG_ALIGN(int
the alignment shift la)Align the memory allocation to start at an address that is a multiple of |
| public static int | MALLOCX_TCACHE(int
the thread-specific cache tc)Use the thread-specific cache (tcache) specified by the identifier |
| public static long | |
| public static long | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static int | nje_mallctl(long name, long oldp, long oldlenp, long newp, long
the new value length newlen)Unsafe version of: |
| public static int | nje_mallctlbymib(long mib, long
the number of elements in miblen, long oldp, long oldlenp, long newp, long mibthe new value length newlen)Unsafe version of: |
| public static int | nje_mallctlnametomib(long name, long mibp, long
the number of components in miblenp)mibpUnsafe version of: |
| public static long | |
| public static void | nje_malloc_stats_print(long write_cb, long cbopaque, long opts)
Unsafe version of: |
| public static long | |
| public static long | |
| public static long | |
| public static int | |
| public static long | |
| public static long | |
| public static long | |
| public static void | |
| public static long |