This class should be used in a thread-local manner for stack allocations.
Configuration#STACK_SIZE, Configuration#DEBUG_STACK
| Modifier and Type | Class and Description |
|---|---|
| private static class | MemoryStack.
Stores the method that pushed a frame and checks if it is the same method when the frame is popped. |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | |
| private static final int | |
| private static final int | |
| protected int | |
| private int[] | |
| private int | |
| private final int | |
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| protected | MemoryStack(ByteBuffer
the backing memory buffer, may be null container, long the backing memory address address, int the backing memory size size)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | ASCII(CharSequence
the text to encode text)Encodes the specified text on the stack using ASCII encoding and returns a |
| public ByteBuffer | ASCII(CharSequence
the text to encode text, boolean if true, a null-terminator is included at the end of the encoded text nullTerminated)Encodes the specified text on the stack using ASCII encoding and returns a |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | |
| public CLongBuffer | |
| public DoubleBuffer | |
| public FloatBuffer | |
| public IntBuffer | |
| public LongBuffer | |
| public PointerBuffer | |
| public ShortBuffer | |
| private static void | |
| private void | |
| public CLongBuffer | |
| public CLongBuffer | |
| public CLongBuffer | |
| public CLongBuffer | |
| public CLongBuffer | |
| public void | |
| public static MemoryStack | |
| public static MemoryStack | create(int
the maximum number of bytes that may be allocated on the stack capacity)Creates a new |
| public static MemoryStack | create(ByteBuffer
the backing memory buffer buffer)Creates a new |
| public DoubleBuffer | |
| public DoubleBuffer | |
| public DoubleBuffer | |
| public DoubleBuffer | |
| public DoubleBuffer | |
| public FloatBuffer | |
| public FloatBuffer | |
| public FloatBuffer | |
| public FloatBuffer | |
| public FloatBuffer | |
| private void | |
| public long | |
| public int | |
| public int | |
| public long | |
| public int | |
| public IntBuffer | |
| public IntBuffer | |
| public IntBuffer | |
| public IntBuffer | |
| public IntBuffer | |
| public LongBuffer | |
| public LongBuffer | |
| public LongBuffer | |
| public LongBuffer | |
| public LongBuffer | |
| public ByteBuffer | Returns: the allocated bufferthe required buffer alignment alignment, int the number of elements in the buffer size)Allocates an aligned |
| public ByteBuffer | Returns: the allocated bufferthe number of elements in the buffer size)Allocates a |
| public CLongBuffer | |
| public DoubleBuffer | |
| public FloatBuffer | |
| public IntBuffer | |
| public LongBuffer | |
| public PointerBuffer | |
| public ShortBuffer | |
| public int | nASCII(CharSequence
the text to encode text, boolean if true, a null-terminator is included at the end of the encoded text nullTerminated)Encodes the specified text on the stack using ASCII encoding and returns the encoded text length, in bytes. |
| public int | |
| public long | |
| public long | Returns: the memory address on the stack for the requested allocationthe required element alignment alignment, int num the number of elements to allocate num, int the size of each element size)Allocates a block of memory on the stack for an array of |
| public long | |
| public static MemoryStack | ncreate(long
the backing memory address address, int the backing memory size size)Creates a new |
| public long | |
| public long | |
| public long | |
| public long | |
| public long | Returns: the memory address on the stack for the requested allocationthe allocation size size)Calls |
| public long | Returns: the memory address on the stack for the requested allocationthe required alignment alignment, int the allocation size size)Allocates a block of |
| public long | |
| public long | |
| public long | |
| public long | |
| public static long | |
| public static long | |
| public static long | |
| public int | nUTF16(CharSequence
the text to encode text, boolean if true, a null-terminator is included at the end of the encoded text nullTerminated)Encodes the specified text on the stack using UTF16 encoding and returns the encoded text length, in bytes. |
| public int | |
| public int | nUTF8(CharSequence
the text to encode text, boolean if true, a null-terminator is included at the end of the encoded text nullTerminated)Encodes the specified text on the stack using UTF8 encoding and returns the encoded text length, in bytes. |
| public int | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | Returns: aPointerBuffer containing the buffer's element addressesthe buffer)CustomBuffer to obtain its element addresses ofAllocates a new |
| public MemoryStack | Returns: this stackPops the current stack frame and moves the stack pointer to the end of the previous stack frame. |
| public MemoryStack | |
| public void | |
| public ShortBuffer | |
| public ShortBuffer | |
| public ShortBuffer | |
| public ShortBuffer | |
| public ShortBuffer | |
| public static ByteBuffer | |
| public static ByteBuffer | stackASCII(CharSequence text, boolean nullTerminated)
Thread-local version of |
| public static ByteBuffer | |
| public static ByteBuffer | stackASCIISafe(CharSequence text, boolean nullTerminated)
Thread-local version of |
| public static ByteBuffer | |
| public static ByteBuffer | |
| public static ByteBuffer | |
| public static ByteBuffer | |
| public static ByteBuffer | |
| public static ByteBuffer | |
| public static CLongBuffer | |
| public static DoubleBuffer | |
| public static FloatBuffer | |
| public static IntBuffer | |
| public static LongBuffer | |
| public static PointerBuffer | |
| public static ShortBuffer | |
| public static CLongBuffer | |
| public static CLongBuffer | |
| public static CLongBuffer | |
| public static CLongBuffer | |
| public static CLongBuffer | |
| public static DoubleBuffer | |
| public static DoubleBuffer | |
| public static DoubleBuffer | |
| public static DoubleBuffer | stackDoubles(double x, double y, double z, double w)
Thread-local version of |
| public static DoubleBuffer | |
| public static FloatBuffer | |
| public static FloatBuffer | |
| public static FloatBuffer | |
| public static FloatBuffer | stackFloats(float x, float y, float z, float w)
Thread-local version of |
| public static FloatBuffer | |
| public static MemoryStack | |
| public static IntBuffer | |
| public static IntBuffer | |
| public static IntBuffer | |
| public static IntBuffer | |
| public static IntBuffer | |
| public static LongBuffer | |
| public static LongBuffer | |
| public static LongBuffer | |
| public static LongBuffer | |
| public static LongBuffer | |
| public static ByteBuffer | |
| public static CLongBuffer | |
| public static DoubleBuffer | |
| public static FloatBuffer | |
| public static IntBuffer | |
| public static LongBuffer | |
| public static PointerBuffer | |
| public static ShortBuffer | |
| public static PointerBuffer | |
| public static PointerBuffer | |
| public static PointerBuffer | |
| public static PointerBuffer | stackPointers(long x, long y, long z, long w)
Thread-local version of |
| public static PointerBuffer | |
| public static PointerBuffer | |
| public static PointerBuffer | |
| public static PointerBuffer | stackPointers(Pointer x, Pointer y, Pointer z)
Thread-local version of |
| public static PointerBuffer | stackPointers(Pointer x, Pointer y, Pointer z, Pointer w)
Thread-local version of |
| public static PointerBuffer | |
| public static MemoryStack | |
| public static MemoryStack | |
| public static ShortBuffer | |
| public static ShortBuffer | |
| public static ShortBuffer | |
| public static ShortBuffer | stackShorts(short x, short y, short z, short w)
Thread-local version of |
| public static ShortBuffer | |
| public static ByteBuffer | |
| public static ByteBuffer | stackUTF16(CharSequence text, boolean nullTerminated)
Thread-local version of |
| public static ByteBuffer | |
| public static ByteBuffer | stackUTF16Safe(CharSequence text, boolean nullTerminated)
Thread-local version of |
| public static ByteBuffer | |
| public static ByteBuffer | stackUTF8(CharSequence text, boolean nullTerminated)
Thread-local version of |
| public static ByteBuffer | |
| public static ByteBuffer | stackUTF8Safe(CharSequence text, boolean nullTerminated)
Thread-local version of |
| public ByteBuffer | UTF16(CharSequence
the text to encode text)Encodes the specified text on the stack using UTF16 encoding and returns a |
| public ByteBuffer | UTF16(CharSequence
the text to encode text, boolean if true, a null-terminator is included at the end of the encoded text nullTerminated)Encodes the specified text on the stack using UTF16 encoding and returns a |
| public ByteBuffer | |
| public ByteBuffer | |
| public ByteBuffer | UTF8(CharSequence
the text to encode text)Encodes the specified text on the stack using UTF8 encoding and returns a |
| public ByteBuffer | UTF8(CharSequence
the text to encode text, boolean if true, a null-terminator is included at the end of the encoded text nullTerminated)Encodes the specified text on the stack using UTF8 encoding and returns a |
| public ByteBuffer | |
| public ByteBuffer |