Package org.gnome.glib
Class MemVTable
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.glib.MemVTable
- All Implemented Interfaces:
Proxy
A set of functions used to perform memory allocation. The same
GMemVTable must
be used for all allocations in the same program; a call to g_mem_set_vtable(),
if it exists, should be prior to any use of GLib.
This functions related to this has been deprecated in 2.46, and no longer work.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface declaration of theCallocCallbackcallback.static interfaceFunctional interface declaration of theFreeCallbackcallback.static interfaceFunctional interface declaration of theMallocCallbackcallback.static interfaceFunctional interface declaration of theReallocCallbackcallback.static interfaceFunctional interface declaration of theTryMallocCallbackcallback.static interfaceFunctional interface declaration of theTryReallocCallbackcallback. -
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new MemVTable.Allocate a new MemVTable.MemVTable(MemorySegment address) Create a MemVTable proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.voidoverrideCalloc(MemVTable.CallocCallback calloc, Arena _arena) Write a value in the fieldcalloc.voidoverrideFree(MemVTable.FreeCallback free, Arena _arena) Write a value in the fieldfree.voidoverrideMalloc(MemVTable.MallocCallback malloc, Arena _arena) Write a value in the fieldmalloc.voidoverrideRealloc(MemVTable.ReallocCallback realloc, Arena _arena) Write a value in the fieldrealloc.voidoverrideTryMalloc(MemVTable.TryMallocCallback tryMalloc, Arena _arena) Write a value in the fieldtry_malloc.voidoverrideTryRealloc(MemVTable.TryReallocCallback tryRealloc, Arena _arena) Write a value in the fieldtry_realloc.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
MemVTable
Create a MemVTable proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
MemVTable
Allocate a new MemVTable.- Parameters:
arena- to control the memory allocation scope
-
MemVTable
public MemVTable()Allocate a new MemVTable. The memory is allocated withArena.ofAuto().
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
overrideMalloc
Write a value in the fieldmalloc.- Parameters:
malloc- The new value for the fieldmalloc_arena- to control the memory allocation scope
-
overrideRealloc
Write a value in the fieldrealloc.- Parameters:
realloc- The new value for the fieldrealloc_arena- to control the memory allocation scope
-
overrideFree
Write a value in the fieldfree.- Parameters:
free- The new value for the fieldfree_arena- to control the memory allocation scope
-
overrideCalloc
Write a value in the fieldcalloc.- Parameters:
calloc- The new value for the fieldcalloc_arena- to control the memory allocation scope
-
overrideTryMalloc
Write a value in the fieldtry_malloc.- Parameters:
tryMalloc- The new value for the fieldtry_malloc_arena- to control the memory allocation scope
-
overrideTryRealloc
Write a value in the fieldtry_realloc.- Parameters:
tryRealloc- The new value for the fieldtry_realloc_arena- to control the memory allocation scope
-