Record Class VmaDefragmentationMove
- All Implemented Interfaces:
IPointer,IVmaDefragmentationMove
Single move of an allocation to be done for defragmentation.
Structure
typedef struct VmaDefragmentationMove {
VmaDefragmentationMoveOperation operation;
VmaAllocation srcAllocation;
VmaAllocation dstTmpAllocation;
} VmaDefragmentationMove;
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
operation()Operation to be performed on the allocation by vmaEndDefragmentationPass(). Default value isVMA_DEFRAGMENTATION_MOVE_OPERATION_COPY. You can modify it.srcAllocation()Allocation that should be moved.dstTmpAllocation()Temporary allocation pointing to destination memory that will replace `srcAllocation`.Warning: Do not store this allocation in your data structures! It exists only temporarily, for the duration of the defragmentation pass, to be used for binding new buffer/image to the destination memory using e.g. vmaBindBufferMemory(). vmaEndDefragmentationPass() will destroy it and make
srcAllocationpoint to this memory.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionVmaDefragmentationMove(@NotNull MemorySegment segment) Creates an instance of aVmaDefragmentationMoverecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VmaDefragmentationMovestatic VmaDefragmentationMove.Ptrstatic VmaDefragmentationMoveclone(Arena arena, VmaDefragmentationMove src) @Nullable VmaAllocationdstTmpAllocation(@Nullable VmaAllocation value) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intoperation(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.@Nullable VmaAllocationsrcAllocation(@Nullable VmaAllocation value) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$operation
-
PATH$srcAllocation
-
PATH$dstTmpAllocation
-
LAYOUT$operation
-
LAYOUT$srcAllocation
-
LAYOUT$dstTmpAllocation
-
SIZE$operation
public static final long SIZE$operation -
SIZE$srcAllocation
public static final long SIZE$srcAllocation -
SIZE$dstTmpAllocation
public static final long SIZE$dstTmpAllocation -
OFFSET$operation
public static final long OFFSET$operation -
OFFSET$srcAllocation
public static final long OFFSET$srcAllocation -
OFFSET$dstTmpAllocation
public static final long OFFSET$dstTmpAllocation
-
-
Constructor Details
-
VmaDefragmentationMove
Creates an instance of aVmaDefragmentationMoverecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
operation
-
operation
-
srcAllocation
-
srcAllocation
-
dstTmpAllocation
-
dstTmpAllocation
-
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 thesegmentrecord component.
-