Interface ExtentAllocI
-
- All Superinterfaces:
org.lwjgl.system.CallbackI
,org.lwjgl.system.Pointer
- All Known Implementing Classes:
ExtentAlloc
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ExtentAllocI extends org.lwjgl.system.CallbackI
Instances of this interface may be set to theExtentHooks
struct.Type
void * (*
invoke(long, long, long, long, long, long, int)
) ( extent_hooks_t *extent_hooks, void *new_addr, size_t size, size_t alignment, bool *zero, bool *commit, unsigned int arena_ind )
-
-
Field Summary
Fields Modifier and Type Field Description static org.lwjgl.system.libffi.FFICIF
CIF
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
callback(long ret, long args)
default org.lwjgl.system.libffi.FFICIF
getCallInterface()
long
invoke(long extent_hooks, long new_addr, long size, long alignment, long zero, long commit, int arena_ind)
Extent allocation hook.
-
-
-
Method Detail
-
getCallInterface
default org.lwjgl.system.libffi.FFICIF getCallInterface()
- Specified by:
getCallInterface
in interfaceorg.lwjgl.system.CallbackI
-
callback
default void callback(long ret, long args)
- Specified by:
callback
in interfaceorg.lwjgl.system.CallbackI
-
invoke
long invoke(long extent_hooks, long new_addr, long size, long alignment, long zero, long commit, int arena_ind)
Extent allocation hook.An extent allocation function conforms to the
extent_alloc_t
type and upon success returns a pointer tosize
bytes of mapped memory on behalf of arenaarena_ind
such that the extent's base address is a multiple ofalignment
, 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 returnsNULL
and leaves*zero
and*commit
unmodified. Thesize
parameter is always a multiple of the page size. Thealignment
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. Ifnew_addr
is notNULL
, the returned pointer must benew_addr
on success orNULL
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'sarena.i.dss
setting irrelevant.
-
-