public class LibCStdlib
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.nio.ByteBuffer |
aligned_alloc(long alignment,
long size)
Allocates
size bytes of uninitialized storage whose alignment is specified by alignment. |
static void |
aligned_free(java.nio.ByteBuffer ptr)
Frees a block of memory that was allocated with
aligned_alloc(long, long). |
static void |
aligned_free(java.nio.DoubleBuffer ptr)
Frees a block of memory that was allocated with
aligned_alloc(long, long). |
static void |
aligned_free(java.nio.FloatBuffer ptr)
Frees a block of memory that was allocated with
aligned_alloc(long, long). |
static void |
aligned_free(java.nio.IntBuffer ptr)
Frees a block of memory that was allocated with
aligned_alloc(long, long). |
static void |
aligned_free(java.nio.LongBuffer ptr)
Frees a block of memory that was allocated with
aligned_alloc(long, long). |
static void |
aligned_free(org.lwjgl.PointerBuffer ptr)
Frees a block of memory that was allocated with
aligned_alloc(long, long). |
static void |
aligned_free(java.nio.ShortBuffer ptr)
Frees a block of memory that was allocated with
aligned_alloc(long, long). |
static java.nio.ByteBuffer |
calloc(long nmemb,
long size)
Allocates memory for an array of
nmemb elements of size bytes each and returns a pointer to the allocated memory. |
static void |
free(java.nio.ByteBuffer ptr)
Frees the memory space pointed to by
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). |
static void |
free(java.nio.DoubleBuffer ptr)
Frees the memory space pointed to by
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). |
static void |
free(java.nio.FloatBuffer ptr)
Frees the memory space pointed to by
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). |
static void |
free(java.nio.IntBuffer ptr)
Frees the memory space pointed to by
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). |
static void |
free(java.nio.LongBuffer ptr)
Frees the memory space pointed to by
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). |
static void |
free(org.lwjgl.PointerBuffer ptr)
Frees the memory space pointed to by
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). |
static void |
free(java.nio.ShortBuffer ptr)
Frees the memory space pointed to by
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). |
static java.nio.ByteBuffer |
malloc(long size)
Allocates
size bytes and returns a pointer to the allocated memory. |
static long |
naligned_alloc(long alignment,
long size)
Unsafe version of:
aligned_alloc(long, long) |
static void |
naligned_free(long ptr)
Unsafe version of:
aligned_free(java.nio.ByteBuffer) |
static long |
ncalloc(long nmemb,
long size)
Unsafe version of:
calloc(long, long) |
static void |
nfree(long ptr)
Unsafe version of:
free(java.nio.ByteBuffer) |
static long |
nmalloc(long size)
Unsafe version of:
malloc(long) |
static long |
nrealloc(long ptr,
long size)
Unsafe version of:
realloc(java.nio.ByteBuffer, long) |
static java.nio.ByteBuffer |
realloc(java.nio.ByteBuffer ptr,
long size)
Changes the size of the memory block pointed to by
ptr to size bytes The contents will be unchanged in the range from the start of the
region up to the minimum of the old and new sizes. |
public static long nmalloc(long size)
malloc(long)@Nullable public static java.nio.ByteBuffer malloc(long size)
size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns
either NULL, or a unique pointer value that can later be successfully passed to free(java.nio.ByteBuffer).size - the number of bytes to allocatepublic static long ncalloc(long nmemb,
long size)
calloc(long, long)@Nullable
public static java.nio.ByteBuffer calloc(long nmemb,
long size)
nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is set to
zero. If nmemb or size is 0, then calloc() returns either NULL, or a unique pointer value that can later be successfully passed to
free(java.nio.ByteBuffer).nmemb - the number of elements to allocatesize - the number of bytes to allocate per elementpublic static long nrealloc(long ptr,
long size)
realloc(java.nio.ByteBuffer, long)@Nullable
public static java.nio.ByteBuffer realloc(@Nullable
java.nio.ByteBuffer ptr,
long size)
ptr to size bytes The contents will be unchanged in the range from the start of the
region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized. If
ptr is NULL, then the call is equivalent to malloc(size), for all values of size; if size is equal to zero, and
ptr is not NULL, then the call is equivalent to free(ptr). Unless ptr is NULL, it must have been returned by an earlier call
to malloc(long), calloc(long, long) or realloc(java.nio.ByteBuffer, long). If the area pointed to was moved, a free(ptr) is done.ptr - the memory block to reallocatesize - the new memory block size, in bytespublic static void nfree(long ptr)
free(java.nio.ByteBuffer)public static void free(@Nullable
java.nio.ByteBuffer ptr)
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). Otherwise,
or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed.ptr - the memory space to freepublic static void free(@Nullable
java.nio.ShortBuffer ptr)
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). Otherwise,
or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed.ptr - the memory space to freepublic static void free(@Nullable
java.nio.IntBuffer ptr)
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). Otherwise,
or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed.ptr - the memory space to freepublic static void free(@Nullable
java.nio.LongBuffer ptr)
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). Otherwise,
or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed.ptr - the memory space to freepublic static void free(@Nullable
java.nio.FloatBuffer ptr)
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). Otherwise,
or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed.ptr - the memory space to freepublic static void free(@Nullable
java.nio.DoubleBuffer ptr)
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). Otherwise,
or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed.ptr - the memory space to freepublic static void free(@Nullable
org.lwjgl.PointerBuffer ptr)
ptr, which must have been returned by a previous call to malloc(long), calloc(long, long), or realloc(java.nio.ByteBuffer, long). Otherwise,
or if free(ptr) has already been called before, undefined behavior occurs. If ptr is NULL, no operation is performed.ptr - the memory space to freepublic static long naligned_alloc(long alignment,
long size)
aligned_alloc(long, long)@Nullable
public static java.nio.ByteBuffer aligned_alloc(long alignment,
long size)
size bytes of uninitialized storage whose alignment is specified by alignment. The size parameter must be an integral multiple
of alignment. Memory allocated with aligned_alloc() must be freed with aligned_free(java.nio.ByteBuffer).alignment - the alignment. Must be a power of two value.size - the number of bytes to allocate. Must be a multiple of alignment.public static void naligned_free(long ptr)
aligned_free(java.nio.ByteBuffer)public static void aligned_free(@Nullable
java.nio.ByteBuffer ptr)
aligned_alloc(long, long). If ptr is NULL, no operation is performed.ptr - the aligned block of memory to freepublic static void aligned_free(@Nullable
java.nio.ShortBuffer ptr)
aligned_alloc(long, long). If ptr is NULL, no operation is performed.ptr - the aligned block of memory to freepublic static void aligned_free(@Nullable
java.nio.IntBuffer ptr)
aligned_alloc(long, long). If ptr is NULL, no operation is performed.ptr - the aligned block of memory to freepublic static void aligned_free(@Nullable
java.nio.LongBuffer ptr)
aligned_alloc(long, long). If ptr is NULL, no operation is performed.ptr - the aligned block of memory to freepublic static void aligned_free(@Nullable
java.nio.FloatBuffer ptr)
aligned_alloc(long, long). If ptr is NULL, no operation is performed.ptr - the aligned block of memory to freepublic static void aligned_free(@Nullable
java.nio.DoubleBuffer ptr)
aligned_alloc(long, long). If ptr is NULL, no operation is performed.ptr - the aligned block of memory to freepublic static void aligned_free(@Nullable
org.lwjgl.PointerBuffer ptr)
aligned_alloc(long, long). If ptr is NULL, no operation is performed.ptr - the aligned block of memory to freeCopyright LWJGL. All Rights Reserved. License terms.