org.lwjgl.system.jemalloc.ExtentSplitI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-jemalloc Show documentation
Show all versions of lwjgl-jemalloc Show documentation
A general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.system.jemalloc;
import org.lwjgl.system.*;
import static org.lwjgl.system.dyncall.DynCallback.*;
/**
* Instances of this interface may be set to the {@link ExtentHooks} struct.
*
* Type
*
*
* bool (*) (
* extent_hooks_t *extent_hooks,
* void *addr,
* size_t size,
* size_t size_a,
* size_t size_b,
* bool committed,
* unsigned int arena_ind
* )
*/
@FunctionalInterface
@NativeType("extent_split_t")
public interface ExtentSplitI extends CallbackI.Z {
String SIGNATURE = "(pppppBi)B";
@Override
default String getSignature() { return SIGNATURE; }
@Override
default boolean callback(long args) {
return invoke(
dcbArgPointer(args),
dcbArgPointer(args),
dcbArgPointer(args),
dcbArgPointer(args),
dcbArgPointer(args),
dcbArgBool(args),
dcbArgInt(args)
);
}
/**
* Extent split hook.
*
* An extent split function conforms to the {@code extent_split_t} type and optionally splits an extent at given {@code addr} and {@code size} into two
* adjacent extents, the first of {@code size_a} bytes, and the second of {@code size_b} bytes, operating on {@code committed}/decommitted memory as
* indicated, on behalf of arena {@code arena_ind}, returning false upon success. If the function returns true, this indicates that the extent remains unsplit
* and therefore should continue to be operated on as a whole.
*/
@NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr, @NativeType("size_t") long size, @NativeType("size_t") long size_a, @NativeType("size_t") long size_b, @NativeType("bool") boolean committed, @NativeType("unsigned int") int arena_ind);
}