Class VkMemoryHeap

  • All Implemented Interfaces:

    public class VkMemoryHeap
    extends Struct
    Structure specifying a memory heap.

    Member documentation

    • size – the total memory size in bytes in the heap.
    • flags – a bitmask of VkMemoryHeapFlagBits specifying attribute flags for the heap.


     struct VkMemoryHeap {
         VkDeviceSize size;
         VkMemoryHeapFlags flags;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SIZE, FLAGS

        The struct member offsets.
    • Constructor Detail

      • VkMemoryHeap

        public VkMemoryHeap​(java.nio.ByteBuffer container)
        Creates a VkMemoryHeap instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • size

        public long size()
        Returns the value of the size field.
      • flags

        public int flags()
        Returns the value of the flags field.
      • create

        public static VkMemoryHeap create​(long address)
        Returns a new VkMemoryHeap instance for the specified memory address.
      • createSafe

        public static VkMemoryHeap createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static VkMemoryHeap.Buffer create​(long address,
                                                 int capacity)
        Create a VkMemoryHeap.Buffer instance at the specified memory.
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        public static VkMemoryHeap.Buffer createSafe​(long address,
                                                     int capacity)
        Like create, but returns null if address is NULL.
      • nsize

        public static long nsize​(long struct)
        Unsafe version of size().
      • nflags

        public static int nflags​(long struct)
        Unsafe version of flags().