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 TypeMethodDescriptionlong
aligned_alloc
(long alignment, long size) Called byMemoryUtil.memAlignedAlloc(int, int)
.void
aligned_free
(long ptr) long
calloc
(long num, long size) Called byMemoryUtil.memCalloc(int, int)
.void
free
(long ptr) Called byMemoryUtil.memFree(java.nio.Buffer)
.long
Returns a pointer to the aligned_alloc function.long
Returns a pointer to the aligned_free function.long
Returns a pointer to the calloc function.long
getFree()
Returns a pointer to the free function.long
Returns a pointer to the malloc function.long
Returns a pointer to the realloc function.long
malloc
(long size) Called byMemoryUtil.memAlloc(int)
.long
realloc
(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)
-