Record Class VkAllocationCallbacks

java.lang.Object
java.lang.Record
club.doki7.vulkan.datatype.VkAllocationCallbacks
All Implemented Interfaces:
IPointer, IVkAllocationCallbacks

@ValueBasedCandidate @UnsafeConstructor public record VkAllocationCallbacks(@NotNull MemorySegment segment) extends Record implements IVkAllocationCallbacks

Represents a pointer to a VkAllocationCallbacks structure in native memory.

Structure

typedef struct VkAllocationCallbacks {
    void* pUserData; // optional
    PFN_vkAllocationFunction pfnAllocation;
    PFN_vkReallocationFunction pfnReallocation;
    PFN_vkFreeFunction pfnFree;
    PFN_vkInternalAllocationNotification pfnInternalAllocation; // optional
    PFN_vkInternalFreeNotification pfnInternalFree; // optional
} VkAllocationCallbacks;

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.

See Also:
  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$pUserData

      public static final MemoryLayout.PathElement PATH$pUserData
    • PATH$pfnAllocation

      public static final MemoryLayout.PathElement PATH$pfnAllocation
    • PATH$pfnReallocation

      public static final MemoryLayout.PathElement PATH$pfnReallocation
    • PATH$pfnFree

      public static final MemoryLayout.PathElement PATH$pfnFree
    • PATH$pfnInternalAllocation

      public static final MemoryLayout.PathElement PATH$pfnInternalAllocation
    • PATH$pfnInternalFree

      public static final MemoryLayout.PathElement PATH$pfnInternalFree
    • LAYOUT$pUserData

      public static final AddressLayout LAYOUT$pUserData
    • LAYOUT$pfnAllocation

      public static final AddressLayout LAYOUT$pfnAllocation
    • LAYOUT$pfnReallocation

      public static final AddressLayout LAYOUT$pfnReallocation
    • LAYOUT$pfnFree

      public static final AddressLayout LAYOUT$pfnFree
    • LAYOUT$pfnInternalAllocation

      public static final AddressLayout LAYOUT$pfnInternalAllocation
    • LAYOUT$pfnInternalFree

      public static final AddressLayout LAYOUT$pfnInternalFree
    • SIZE$pUserData

      public static final long SIZE$pUserData
    • SIZE$pfnAllocation

      public static final long SIZE$pfnAllocation
    • SIZE$pfnReallocation

      public static final long SIZE$pfnReallocation
    • SIZE$pfnFree

      public static final long SIZE$pfnFree
    • SIZE$pfnInternalAllocation

      public static final long SIZE$pfnInternalAllocation
    • SIZE$pfnInternalFree

      public static final long SIZE$pfnInternalFree
    • OFFSET$pUserData

      public static final long OFFSET$pUserData
    • OFFSET$pfnAllocation

      public static final long OFFSET$pfnAllocation
    • OFFSET$pfnReallocation

      public static final long OFFSET$pfnReallocation
    • OFFSET$pfnFree

      public static final long OFFSET$pfnFree
    • OFFSET$pfnInternalAllocation

      public static final long OFFSET$pfnInternalAllocation
    • OFFSET$pfnInternalFree

      public static final long OFFSET$pfnInternalFree
  • Constructor Details

    • VkAllocationCallbacks

      public VkAllocationCallbacks(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a VkAllocationCallbacks record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details