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

org.lwjgl.system.rpmalloc.RPMemoryMapCallbackI 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 static org.lwjgl.system.dyncall.DynCallback.*;

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

Type

* *
 * void* (*) (
 *     size_t size
 * )
*/ @FunctionalInterface @NativeType("void* (*) (size_t)") public interface RPMemoryMapCallbackI extends CallbackI.P { String SIGNATURE = "(p)p"; @Override default String getSignature() { return SIGNATURE; } @Override default long callback(long args) { return invoke( dcbArgPointer(args) ); } /** * Map memory pages for the given number of bytes. * *

The returned address MUST be 2 byte aligned, and should ideally be 64KiB aligned. If memory returned is not 64KiB aligned rpmalloc will call unmap and * then another map request with size padded by 64KiB in order to align it internally.

* * @param size the number of bytes to map */ @NativeType("void *") long invoke(@NativeType("size_t") long size); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy