All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.system.rpmalloc.RPMapFailCallbackI Maven / Gradle / Ivy

Go to download

A public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.system.rpmalloc;

import org.lwjgl.system.*;
import org.lwjgl.system.libffi.*;

import static org.lwjgl.system.APIUtil.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.libffi.LibFFI.*;

/**
 * Instances of this interface may be set to the {@link RPMallocConfig} struct.
 * 
 * 

Type

* *

 * int (*{@link #invoke}) (
 *     size_t size
 * )
*/ @FunctionalInterface @NativeType("int (*) (size_t)") public interface RPMapFailCallbackI extends CallbackI { FFICIF CIF = apiCreateCIF( FFI_DEFAULT_ABI, ffi_type_sint32, ffi_type_pointer ); @Override default FFICIF getCallInterface() { return CIF; } @Override default void callback(long ret, long args) { int __result = invoke( memGetAddress(memGetAddress(args)) ); apiClosureRet(ret, __result); } /** * Called when a call to map memory pages fails (out of memory). * *

If this callback is not set or returns zero the library will return a null pointer in the allocation call. If this callback returns non-zero the * map call will be retried. The argument passed is the number of bytes that was requested in the map call. Only used if the default system memory map * function is used ({@code memory_map} callback is not set).

*/ int invoke(@NativeType("size_t") long size); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy