Class CUmemPoolProps

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

    public class CUmemPoolProps
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Specifies the properties of allocations made from the pool.

    Layout

    
     struct CUmemPoolProps {
         CUmemAllocationType allocType();
         CUmemAllocationHandleType handleTypes();
         CUmemLocation location();
         void * win32SecurityAttributes();
         unsigned char reserved()[64];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ALLOCTYPE, HANDLETYPES, LOCATION, WIN32SECURITYATTRIBUTES, RESERVED

        The struct member offsets.
    • Constructor Detail

      • CUmemPoolProps

        public CUmemPoolProps​(java.nio.ByteBuffer container)
        Creates a CUmemPoolProps 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
      • handleTypes

        public int handleTypes()
        handle types that will be supported by allocations from the pool
      • location

        public CUmemLocation location()
        location where allocations should reside
      • win32SecurityAttributes

        public long win32SecurityAttributes()
        windows-specific LPSECURITYATTRIBUTES required when MEM_HANDLE_TYPE_WIN32 is specified. This security attribute defines the scope of which exported allocations may be tranferred to other processes. In all other cases, this field is required to be zero.
      • reserved

        public java.nio.ByteBuffer reserved()
        
        public byte reserved​(int index)
        
        reserved for future use, must be 0
      • reserved

        public CUmemPoolProps reserved​(java.nio.ByteBuffer value)
        Copies the specified ByteBuffer to the reserved() field.
      • reserved

        public CUmemPoolProps reserved​(int index,
                                       byte value)
        Sets the specified value at the specified index of the reserved() field.
      • set

        public CUmemPoolProps set​(int allocType,
                                  int handleTypes,
                                  CUmemLocation location,
                                  long win32SecurityAttributes,
                                  java.nio.ByteBuffer reserved)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static CUmemPoolProps.Buffer calloc​(int capacity,
                                                   org.lwjgl.system.MemoryStack stack)
        Returns a new CUmemPoolProps.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
      • nallocType

        public static int nallocType​(long struct)
        Unsafe version of allocType().
      • nhandleTypes

        public static int nhandleTypes​(long struct)
        Unsafe version of handleTypes().
      • nwin32SecurityAttributes

        public static long nwin32SecurityAttributes​(long struct)
        Unsafe version of win32SecurityAttributes().
      • nreserved

        public static java.nio.ByteBuffer nreserved​(long struct)
        Unsafe version of reserved().
      • nreserved

        public static byte nreserved​(long struct,
                                     int index)
        Unsafe version of reserved.
      • nallocType

        public static void nallocType​(long struct,
                                      int value)
        Unsafe version of allocType.
      • nhandleTypes

        public static void nhandleTypes​(long struct,
                                        int value)
        Unsafe version of handleTypes.
      • nlocation

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

        public static void nwin32SecurityAttributes​(long struct,
                                                    long value)
        Unsafe version of win32SecurityAttributes.
      • nreserved

        public static void nreserved​(long struct,
                                     java.nio.ByteBuffer value)
        Unsafe version of reserved.
      • nreserved

        public static void nreserved​(long struct,
                                     int index,
                                     byte value)
        Unsafe version of reserved.