extent_hooks_t structure comprises function pointers which are described individually below. jemalloc uses these functions to manage extent
lifetime, which starts off with allocation of mapped committed memory, in the simplest case followed by deallocation. However, there are performance
and platform reasons to retain extents for later reuse. Cleanup attempts cascade from deallocation to decommit to forced purging to lazy purging, which
gives the extent management functions opportunities to reject the most permanent cleanup operations in favor of less permanent (and often less costly)
operations. All operations except allocation can be universally opted out of by setting the hook pointers to NULL, or selectively opted out of by
returning failure.
struct extent_hooks_t {
extent_alloc_t alloc;
extent_dalloc_t dalloc;
extent_destroy_t destroy;
extent_commit_t commit;
extent_decommit_t decommit;
extent_purge_t purge_lazy;
extent_purge_t purge_forced;
extent_split_t split;
extent_merge_t merge;
}
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | ALLOC
The struct member offsets. |
| public static final int | COMMIT
The struct member offsets. |
| public static final int | DALLOC
The struct member offsets. |
| public static final int | DECOMMIT
The struct member offsets. |
| public static final int | DESTROY
The struct member offsets. |
| public static final int | MERGE
The struct member offsets. |
| public static final int | PURGE_FORCED
The struct member offsets. |
| public static final int | PURGE_LAZY
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | SPLIT
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | ExtentHooks(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public ExtentAlloc | |
| public ExtentHooks | |
| public static ExtentHooks | |
| public static ExtentHooks | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static ExtentHooks | |
| public static ExtentHooks | |
| public ExtentCommit | |
| public ExtentHooks | |
| protected ExtentHooks | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static ExtentHooks | |
| public static ExtentHooks | |
| public static ExtentHooks | |
| public ExtentDalloc | |
| public ExtentHooks | |
| public ExtentDecommit | |
| public ExtentHooks | |
| public ExtentDestroy | |
| public ExtentHooks | |
| public static ExtentHooks | |
| public static ExtentHooks | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static ExtentHooks | |
| public static ExtentHooks | |
| public ExtentMerge | |
| public ExtentHooks | |
| public static ExtentAlloc | |
| public static void | |
| public static ExtentCommit | |
| public static void | |
| public static ExtentDalloc | |
| public static void | |
| public static ExtentDecommit | |
| public static void | |
| public static ExtentDestroy | |
| public static void | |
| public static ExtentMerge | |
| public static void | |
| public static ExtentPurge | |
| public static void | |
| public static ExtentPurge | |
| public static void | |
| public static ExtentSplit | |
| public static void | |
| public ExtentPurge | |
| public ExtentHooks | |
| public ExtentPurge | |
| public ExtentHooks | |
| public ExtentHooks | set(ExtentAllocI alloc, ExtentDallocI dalloc, ExtentDestroyI destroy, ExtentCommitI commit, ExtentDecommitI decommit, ExtentPurgeI purge_lazy, ExtentPurgeI purge_forced, ExtentSplitI split, ExtentMergeI merge)
Initializes this struct with the specified values. |
| public ExtentHooks | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public ExtentSplit | |
| public ExtentHooks | |
| public static void |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| ALLOC | back to summary |
|---|---|
| public static final int ALLOC The struct member offsets. | |
| COMMIT | back to summary |
|---|---|
| public static final int COMMIT The struct member offsets. | |
| DALLOC | back to summary |
|---|---|
| public static final int DALLOC The struct member offsets. | |
| DECOMMIT | back to summary |
|---|---|
| public static final int DECOMMIT The struct member offsets. | |
| DESTROY | back to summary |
|---|---|
| public static final int DESTROY The struct member offsets. | |
| MERGE | back to summary |
|---|---|
| public static final int MERGE The struct member offsets. | |
| PURGE_FORCED | back to summary |
|---|---|
| public static final int PURGE_FORCED The struct member offsets. | |
| PURGE_LAZY | back to summary |
|---|---|
| public static final int PURGE_LAZY The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| SPLIT | back to summary |
|---|---|
| public static final int SPLIT The struct member offsets. | |
| ExtentHooks | back to summary |
|---|---|
| protected ExtentHooks(long address, ByteBuffer container) | |
| ExtentHooks | back to summary |
|---|---|
| public ExtentHooks(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| alloc | back to summary |
|---|---|
| public ExtentAlloc alloc() the extent allocation hook
| |
| alloc | back to summary |
|---|---|
| public ExtentHooks alloc(ExtentAllocI value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static ExtentHooks calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static ExtentHooks calloc(MemoryStack stack) Returns a new
| |
| callocStack | back to summary |
|---|---|
| public static ExtentHooks callocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static ExtentHooks callocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| commit | back to summary |
|---|---|
| public ExtentCommit commit() the extent commit hook
| |
| commit | back to summary |
|---|---|
| public ExtentHooks commit(ExtentCommitI value) Sets the specified value to the | |
| create | back to summary |
|---|---|
| protected ExtentHooks create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static ExtentHooks create() Returns a new | |
| create | back to summary |
|---|---|
| public static ExtentHooks create(long address) Returns a new | |
| createSafe | back to summary |
|---|---|
| public static ExtentHooks createSafe(long address) Like
| |
| dalloc | back to summary |
|---|---|
| public ExtentDalloc dalloc() the extent deallocation hook
| |
| dalloc | back to summary |
|---|---|
| public ExtentHooks dalloc(ExtentDallocI value) Sets the specified value to the | |
| decommit | back to summary |
|---|---|
| public ExtentDecommit decommit() the extent decommit hook
| |
| decommit | back to summary |
|---|---|
| public ExtentHooks decommit(ExtentDecommitI value) Sets the specified value to the | |
| destroy | back to summary |
|---|---|
| public ExtentDestroy destroy() the extent destruction hook
| |
| destroy | back to summary |
|---|---|
| public ExtentHooks destroy(ExtentDestroyI value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static ExtentHooks malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static ExtentHooks malloc(MemoryStack stack) Returns a new
| |
| mallocStack | back to summary |
|---|---|
| public static ExtentHooks mallocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static ExtentHooks mallocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| merge | back to summary |
|---|---|
| public ExtentMerge merge() the extent merge hook
| |
| merge | back to summary |
|---|---|
| public ExtentHooks merge(ExtentMergeI value) Sets the specified value to the | |
| nalloc | back to summary |
|---|---|
| public static ExtentAlloc nalloc(long struct) Unsafe version of | |
| nalloc | back to summary |
|---|---|
| public static void nalloc(long struct, ExtentAllocI value) Unsafe version of | |
| ncommit | back to summary |
|---|---|
| public static ExtentCommit ncommit(long struct) Unsafe version of
| |
| ncommit | back to summary |
|---|---|
| public static void ncommit(long struct, ExtentCommitI value) Unsafe version of | |
| ndalloc | back to summary |
|---|---|
| public static ExtentDalloc ndalloc(long struct) Unsafe version of
| |
| ndalloc | back to summary |
|---|---|
| public static void ndalloc(long struct, ExtentDallocI value) Unsafe version of | |
| ndecommit | back to summary |
|---|---|
| public static ExtentDecommit ndecommit(long struct) Unsafe version of
| |
| ndecommit | back to summary |
|---|---|
| public static void ndecommit(long struct, ExtentDecommitI value) Unsafe version of | |
| ndestroy | back to summary |
|---|---|
| public static ExtentDestroy ndestroy(long struct) Unsafe version of
| |
| ndestroy | back to summary |
|---|---|
| public static void ndestroy(long struct, ExtentDestroyI value) Unsafe version of | |
| nmerge | back to summary |
|---|---|
| public static ExtentMerge nmerge(long struct) Unsafe version of
| |
| nmerge | back to summary |
|---|---|
| public static void nmerge(long struct, ExtentMergeI value) Unsafe version of | |
| npurge_forced | back to summary |
|---|---|
| public static ExtentPurge npurge_forced(long struct) Unsafe version of
| |
| npurge_forced | back to summary |
|---|---|
| public static void npurge_forced(long struct, ExtentPurgeI value) Unsafe version of | |
| npurge_lazy | back to summary |
|---|---|
| public static ExtentPurge npurge_lazy(long struct) Unsafe version of
| |
| npurge_lazy | back to summary |
|---|---|
| public static void npurge_lazy(long struct, ExtentPurgeI value) Unsafe version of | |
| nsplit | back to summary |
|---|---|
| public static ExtentSplit nsplit(long struct) Unsafe version of
| |
| nsplit | back to summary |
|---|---|
| public static void nsplit(long struct, ExtentSplitI value) Unsafe version of | |
| purge_forced | back to summary |
|---|---|
| public ExtentPurge purge_forced() the extent forced purge hook
| |
| purge_forced | back to summary |
|---|---|
| public ExtentHooks purge_forced(ExtentPurgeI value) Sets the specified value to the | |
| purge_lazy | back to summary |
|---|---|
| public ExtentPurge purge_lazy() the extent lazy purge hook
| |
| purge_lazy | back to summary |
|---|---|
| public ExtentHooks purge_lazy(ExtentPurgeI value) Sets the specified value to the | |
| set | back to summary |
|---|---|
| public ExtentHooks set(ExtentAllocI alloc, ExtentDallocI dalloc, ExtentDestroyI destroy, ExtentCommitI commit, ExtentDecommitI decommit, ExtentPurgeI purge_lazy, ExtentPurgeI purge_forced, ExtentSplitI split, ExtentMergeI merge) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public ExtentHooks set(ExtentHooks src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| split | back to summary |
|---|---|
| public ExtentSplit split() the extent split hook
| |
| split | back to summary |
|---|---|
| public ExtentHooks split(ExtentSplitI value) Sets the specified value to the | |
| validate | back to summary |
|---|---|
| public static void validate(long struct) Validates pointer members that should not be
| |