Record Class VmaVirtualAllocationCreateInfo

java.lang.Object
java.lang.Record
club.doki7.vma.datatype.VmaVirtualAllocationCreateInfo
All Implemented Interfaces:
IPointer, IVmaVirtualAllocationCreateInfo

@ValueBasedCandidate @UnsafeConstructor public record VmaVirtualAllocationCreateInfo(@NotNull MemorySegment segment) extends Record implements IVmaVirtualAllocationCreateInfo

Parameters of created virtual allocation to be passed to vmaVirtualAllocate().

Structure

typedef struct VmaVirtualAllocationCreateInfo {
    VkDeviceSize size;
    VkDeviceSize alignment;
    VmaVirtualAllocationCreateFlags flags;
    void* pUserData; // optional
} VmaVirtualAllocationCreateInfo;

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

  • size() Size of the allocation.

    Cannot be zero.

  • alignment() Required alignment of the allocation. Optional.

    Must be power of two. Special value 0 has the same meaning as 1 - means no special alignment is required, so allocation can start at any offset.

  • flags() Use combination of VmaVirtualAllocationCreateFlagBits.
  • pUserData() Custom pointer to be associated with the allocation. Optional.

    It can be any value and can be used for user-defined purposes. It can be fetched or changed later.