Top Description Inners Constructors Methods
org.lwjgl.system.jemalloc

public abstract Class ExtentAlloc

extends Callback
implements ExtentAllocI
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.jemalloc.ExtentAllocI, org.lwjgl.system.CallbackI, org.lwjgl.system.Pointer
Known Direct Subclasses
org.lwjgl.system.jemalloc.ExtentAlloc.Container
Imports
javax.annotation.*, org.lwjgl.system.*

Instances of this class may be set to the ExtentHooks struct.

Type


void * (*invoke) (
    extent_hooks_t *extent_hooks,
    void *new_addr,
    size_t size,
    size_t alignment,
    bool *zero,
    bool *commit,
    unsigned int arena_ind
)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
protected
pack-priv
ExtentAlloc(long functionPointer)

Method Summary

Modifier and TypeMethod and Description
public static ExtentAlloc

Returns:

the new ExtentAlloc
create
(long functionPointer)

Creates a ExtentAlloc instance from the specified function pointer.

public static ExtentAlloc
create(ExtentAllocI instance)

Creates a ExtentAlloc instance that delegates to the specified ExtentAllocI instance.

public static ExtentAlloc
createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Inherited from org.lwjgl.system.Callback:
addressequalsfreefreegetgetSafehashCodetoString

Constructor Detail

ExtentAllocback to summary
protected ExtentAlloc()
ExtentAllocback to summary
pack-priv ExtentAlloc(long functionPointer)

Method Detail

createback to summary
public static ExtentAlloc create(long functionPointer)

Creates a ExtentAlloc instance from the specified function pointer.

Returns:ExtentAlloc

the new ExtentAlloc

createback to summary
public static ExtentAlloc create(ExtentAllocI instance)

Creates a ExtentAlloc instance that delegates to the specified ExtentAllocI instance.

createSafeback to summary
public static ExtentAlloc createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Annotations
@Nullable
org.lwjgl.system.jemalloc back to summary

private final Class ExtentAlloc.Container

extends ExtentAlloc
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final ExtentAllocI

Constructor Summary

AccessConstructor and Description
pack-priv
Container(long functionPointer, ExtentAllocI delegate)

Method Summary

Modifier and TypeMethod and Description
public long
invoke(long extent_hooks, long new_addr, long size, long alignment, long zero, long commit, int arena_ind)

Implements org.lwjgl.system.jemalloc.ExtentAllocI.invoke.

Extent allocation hook.
Inherited from org.lwjgl.system.jemalloc.ExtentAlloc:
createcreatecreateSafe

Field Detail

delegateback to summary
private final ExtentAllocI delegate

Constructor Detail

Containerback to summary
pack-priv Container(long functionPointer, ExtentAllocI delegate)

Method Detail

invokeback to summary
public long invoke(long extent_hooks, long new_addr, long size, long alignment, long zero, long commit, int arena_ind)

Implements org.lwjgl.system.jemalloc.ExtentAllocI.invoke.

Doc from org.lwjgl.system.jemalloc.ExtentAllocI.invoke.

Extent allocation hook.

An extent allocation function conforms to the extent_alloc_t type and upon success returns a pointer to size bytes of mapped memory on behalf of arena arena_ind such that the extent's base address is a multiple of alignment, as well as setting *zero to indicate whether the extent is zeroed and *commit to indicate whether the extent is committed. Upon error the function returns NULL and leaves *zero and *commit unmodified. The size parameter is always a multiple of the page size. The alignment parameter is always a power of two at least as large as the page size. Zeroing is mandatory if *zero is true upon function entry. Committing is mandatory if *commit is true upon function entry. If new_addr is not NULL, the returned pointer must be new_addr on success or NULL on error. Committed memory may be committed in absolute terms as on a system that does not overcommit, or in implicit terms as on a system that overcommits and satisfies physical memory needs on demand via soft page faults. Note that replacing the default extent allocation function makes the arena's arena.i.dss setting irrelevant.

Annotations
@Override