Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- allocate(Arena)
- allocate(Arena, long)
- clone(Arena, VmaDeviceMemoryCallbacks)
- pfnAllocate()
- pfnAllocate(MemorySegment)
- pfnAllocate(VMAFunctionTypes.IPFN_vmaAllocateDeviceMemoryFunction)
- pfnAllocate(Arena, VMAFunctionTypes.IPFN_vmaAllocateDeviceMemoryFunction)
- pfnAllocate(IPointer)
- pfnFree()
- pfnFree(MemorySegment)
- pfnFree(VMAFunctionTypes.IPFN_vmaFreeDeviceMemoryFunction)
- pfnFree(Arena, VMAFunctionTypes.IPFN_vmaFreeDeviceMemoryFunction)
- pfnFree(IPointer)
- pUserData()
- pUserData(MemorySegment)
- pUserData(IPointer)
- toString()
- hashCode()
- equals(Object)
- segment()
Record Class VmaDeviceMemoryCallbacks
java.lang.Object
java.lang.Record
club.doki7.vma.datatype.VmaDeviceMemoryCallbacks
- All Implemented Interfaces:
IPointer
,IVmaDeviceMemoryCallbacks
@ValueBasedCandidate
@UnsafeConstructor
public record VmaDeviceMemoryCallbacks(@NotNull MemorySegment segment)
extends Record
implements IVmaDeviceMemoryCallbacks
Set of callbacks that the library will call for vkAllocateMemory
and vkFreeMemory
.
Provided for informative purpose, e.g. to gather statistics about number of allocations or total amount of memory allocated in Vulkan.
Used in VmaAllocatorCreateInfo::pDeviceMemoryCallbacks.
Structure 
typedef struct VmaDeviceMemoryCallbacks {
PFN_vmaAllocateDeviceMemoryFunction
pfnAllocate
; // optional
PFN_vmaFreeDeviceMemoryFunction
pfnFree
; // optional
void* pUserData
; // optional
} VmaDeviceMemoryCallbacks;
Contracts 
The property segment()
should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)
), and properly aligned to
LAYOUT.byteAlignment()
bytes. To represent null pointer, you may use a Java
null
instead. See the documentation of IPointer.segment()
for more details.
The constructor of this class is marked as UnsafeConstructor
, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
Member documentation 
pfnAllocate()
Optional, can be null.pfnFree()
Optional, can be null.pUserData()
Optional, can be null.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionVmaDeviceMemoryCallbacks
(@NotNull MemorySegment segment) Creates an instance of aVmaDeviceMemoryCallbacks
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VmaDeviceMemoryCallbacks
static VmaDeviceMemoryCallbacks.Ptr
static VmaDeviceMemoryCallbacks
clone
(Arena arena, VmaDeviceMemoryCallbacks src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull MemorySegment
pfnAllocate
(@Nullable IPointer pointer) pfnAllocate
(@NotNull VMAFunctionTypes.IPFN_vmaAllocateDeviceMemoryFunction value) pfnAllocate
(@NotNull Arena arena, @NotNull VMAFunctionTypes.IPFN_vmaAllocateDeviceMemoryFunction value) pfnAllocate
(@NotNull MemorySegment value) @NotNull MemorySegment
pfnFree()
pfnFree
(@NotNull VMAFunctionTypes.IPFN_vmaFreeDeviceMemoryFunction value) pfnFree
(@NotNull Arena arena, @NotNull VMAFunctionTypes.IPFN_vmaFreeDeviceMemoryFunction value) pfnFree
(@NotNull MemorySegment value) @NotNull MemorySegment
pUserData
(@NotNull MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$pfnAllocate
-
PATH$pfnFree
-
PATH$pUserData
-
LAYOUT$pfnAllocate
-
LAYOUT$pfnFree
-
LAYOUT$pUserData
-
SIZE$pfnAllocate
public static final long SIZE$pfnAllocate -
SIZE$pfnFree
public static final long SIZE$pfnFree -
SIZE$pUserData
public static final long SIZE$pUserData -
OFFSET$pfnAllocate
public static final long OFFSET$pfnAllocate -
OFFSET$pfnFree
public static final long OFFSET$pfnFree -
OFFSET$pUserData
public static final long OFFSET$pUserData
-
-
Constructor Details
-
Method Details
-
allocate
-
allocate
-
clone
-
pfnAllocate
@Pointer(comment="PFN_vmaAllocateDeviceMemoryFunction") @NotNull public @NotNull MemorySegment pfnAllocate() -
pfnAllocate
public VmaDeviceMemoryCallbacks pfnAllocate(@Pointer(comment="PFN_vmaAllocateDeviceMemoryFunction") @NotNull @NotNull MemorySegment value) -
pfnAllocate
public VmaDeviceMemoryCallbacks pfnAllocate(@NotNull @NotNull VMAFunctionTypes.IPFN_vmaAllocateDeviceMemoryFunction value) -
pfnAllocate
public VmaDeviceMemoryCallbacks pfnAllocate(@NotNull @NotNull Arena arena, @NotNull @NotNull VMAFunctionTypes.IPFN_vmaAllocateDeviceMemoryFunction value) -
pfnAllocate
-
pfnFree
@Pointer(comment="PFN_vmaFreeDeviceMemoryFunction") @NotNull public @NotNull MemorySegment pfnFree() -
pfnFree
public VmaDeviceMemoryCallbacks pfnFree(@Pointer(comment="PFN_vmaFreeDeviceMemoryFunction") @NotNull @NotNull MemorySegment value) -
pfnFree
public VmaDeviceMemoryCallbacks pfnFree(@NotNull @NotNull VMAFunctionTypes.IPFN_vmaFreeDeviceMemoryFunction value) -
pfnFree
public VmaDeviceMemoryCallbacks pfnFree(@NotNull @NotNull Arena arena, @NotNull @NotNull VMAFunctionTypes.IPFN_vmaFreeDeviceMemoryFunction value) -
pfnFree
-
pUserData
-
pUserData
public VmaDeviceMemoryCallbacks pUserData(@Pointer(comment="void*") @NotNull @NotNull MemorySegment value) -
pUserData
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-