Package org.lwjgl.system
Interface MemoryUtil.MemoryAllocator
- All Known Implementing Classes:
JEmallocAllocator,RPmallocAllocator
- Enclosing class:
MemoryUtil
public static interface MemoryUtil.MemoryAllocator
The interface implemented by the memory allocator used by the explicit memory management API (
MemoryUtil.memAlloc(int), MemoryUtil.memFree(java.nio.Buffer), etc).-
Method Summary
Modifier and TypeMethodDescriptionlongaligned_alloc(long alignment, long size) Called byMemoryUtil.memAlignedAlloc(int, int).voidaligned_free(long ptr) longcalloc(long num, long size) Called byMemoryUtil.memCalloc(int, int).voidfree(long ptr) Called byMemoryUtil.memFree(java.nio.Buffer).longReturns a pointer to the aligned_alloc function.longReturns a pointer to the aligned_free function.longReturns a pointer to the calloc function.longgetFree()Returns a pointer to the free function.longReturns a pointer to the malloc function.longReturns a pointer to the realloc function.longmalloc(long size) Called byMemoryUtil.memAlloc(int).longrealloc(long ptr, long size)
-
Method Details
-
getMalloc
long getMalloc()Returns a pointer to the malloc function. -
getCalloc
long getCalloc()Returns a pointer to the calloc function. -
getRealloc
long getRealloc()Returns a pointer to the realloc function. -
getFree
long getFree()Returns a pointer to the free function. -
getAlignedAlloc
long getAlignedAlloc()Returns a pointer to the aligned_alloc function. -
getAlignedFree
long getAlignedFree()Returns a pointer to the aligned_free function. -
malloc
long malloc(long size) Called byMemoryUtil.memAlloc(int). -
calloc
long calloc(long num, long size) Called byMemoryUtil.memCalloc(int, int). -
realloc
long realloc(long ptr, long size) -
free
void free(long ptr) Called byMemoryUtil.memFree(java.nio.Buffer). -
aligned_alloc
long aligned_alloc(long alignment, long size) Called byMemoryUtil.memAlignedAlloc(int, int). -
aligned_free
void aligned_free(long ptr)
-