Class CUmemAccessDesc

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class CUmemAccessDesc
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Memory access descriptor.

    Layout

    
     struct CUmemAccessDesc {
         CUmemLocation location();
         CUmemAccess_flags flags();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • LOCATION, FLAGS

        The struct member offsets.
    • Constructor Detail

      • CUmemAccessDesc

        public CUmemAccessDesc​(java.nio.ByteBuffer container)
        Creates a CUmemAccessDesc 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • location

        public CUmemLocation location()
        location on which the request is to change it's accessibility
      • flags

        public int flags()
        CUmemProt accessibility flags to set on the request
      • set

        public CUmemAccessDesc set​(CUmemAccessDesc src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static CUmemAccessDesc malloc()
        Returns a new CUmemAccessDesc instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static CUmemAccessDesc calloc()
        Returns a new CUmemAccessDesc instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static CUmemAccessDesc create()
        Returns a new CUmemAccessDesc instance allocated with BufferUtils.
      • create

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

        @Nullable
        public static CUmemAccessDesc createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static CUmemAccessDesc.Buffer malloc​(int capacity)
        Returns a new CUmemAccessDesc.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static CUmemAccessDesc.Buffer calloc​(int capacity)
        Returns a new CUmemAccessDesc.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

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

        @Nullable
        public static CUmemAccessDesc.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • malloc

        public static CUmemAccessDesc malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new CUmemAccessDesc instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static CUmemAccessDesc calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new CUmemAccessDesc instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static CUmemAccessDesc.Buffer malloc​(int capacity,
                                                    org.lwjgl.system.MemoryStack stack)
        Returns a new CUmemAccessDesc.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static CUmemAccessDesc.Buffer calloc​(int capacity,
                                                    org.lwjgl.system.MemoryStack stack)
        Returns a new CUmemAccessDesc.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nflags

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

        public static void nlocation​(long struct,
                                     CUmemLocation value)
        Unsafe version of location.
      • nflags

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