| Modifier and Type | Class and Description |
|---|---|
| private static class | AllocatedNativeMemoryIO.
Holder for a group of memory allocations. |
| private static class | AllocatedNativeMemoryIO.
Represents a single native memory allocation |
| Modifier and Type | Field and Description |
|---|---|
| private final AllocatedNativeMemoryIO. | |
| private static final ThreadLocal | |
| private static final Map | referenceSet
Keeps strong references to the memory bucket until cleanup |
| private final Object |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static final AllocatedNativeMemoryIO | Returns: A newAllocatedDirectMemoryIOThe Ruby runtime runtime, int The number of bytes to allocate size, boolean Whether the memory should be cleared (zeroed) clear)Allocates native memory |
| pack-priv static AllocatedNativeMemoryIO | Returns: A newAllocatedDirectMemoryIOThe Ruby runtime runtime, int The number of bytes to allocate size, int The minimum alignment of the memory align, boolean Whether the memory should be cleared (zeroed) clear)Allocates native memory, aligned to a minimum boundary. |
| public void | |
| public boolean | |
| public void | setAutoRelease(boolean autorelease)
Implements org.
|
| allocation | back to summary |
|---|---|
| private final AllocatedNativeMemoryIO. | |
| currentBucket | back to summary |
|---|---|
| private static final ThreadLocal<Reference<AllocatedNativeMemoryIO. | |
| referenceSet | back to summary |
|---|---|
| private static final Map<AllocatedNativeMemoryIO. Keeps strong references to the memory bucket until cleanup | |
| sentinel | back to summary |
|---|---|
| private final Object sentinel | |
| AllocatedNativeMemoryIO | back to summary |
|---|---|
| private AllocatedNativeMemoryIO(Ruby runtime, Object sentinel, long address, int size, int align) | |
| allocate | back to summary |
|---|---|
| pack-priv static final AllocatedNativeMemoryIO allocate(Ruby runtime, int size, boolean clear) Allocates native memory
| |
| allocateAligned | back to summary |
|---|---|
| pack-priv static AllocatedNativeMemoryIO allocateAligned(Ruby runtime, int size, int align, boolean clear) Allocates native memory, aligned to a minimum boundary.
| |
| free | back to summary |
|---|---|
| public void free() Implements org. | |
| isAutoRelease | back to summary |
|---|---|
| public boolean isAutoRelease() Implements org. | |
| setAutoRelease | back to summary |
|---|---|
| public void setAutoRelease(boolean autorelease) Implements org. | |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private volatile AllocatedNativeMemoryIO. | |
| public static final int | |
| private final WeakReference |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv boolean | |
| public final void | |
| pack-priv Object |
| bytesUsed | back to summary |
|---|---|
| private long bytesUsed | |
| head | back to summary |
|---|---|
| private volatile AllocatedNativeMemoryIO. | |
| MAX_BYTES_PER_BUCKET | back to summary |
|---|---|
| public static final int MAX_BYTES_PER_BUCKET | |
| weakref | back to summary |
|---|---|
| private final WeakReference<Object> weakref | |
| AllocationGroup | back to summary |
|---|---|
| pack-priv AllocationGroup(Object sentinel) | |
| add | back to summary |
|---|---|
| pack-priv void add(AllocatedNativeMemoryIO. | |
| canAccept | back to summary |
|---|---|
| pack-priv boolean canAccept(int size) | |
| run | back to summary |
|---|---|
| public final void run() Implements java. Doc from java. Runs this operation. | |
| sentinel | back to summary |
|---|---|
| pack-priv Object sentinel() | |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| pack-priv volatile AllocatedNativeMemoryIO. | |
| pack-priv volatile boolean | |
| pack-priv volatile boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final void | |
| pack-priv final void |
| address | back to summary |
|---|---|
| private final long address | |
| next | back to summary |
|---|---|
| pack-priv volatile AllocatedNativeMemoryIO. | |
| released | back to summary |
|---|---|
| pack-priv volatile boolean released | |
| unmanaged | back to summary |
|---|---|
| pack-priv volatile boolean unmanaged | |
| MemoryAllocation | back to summary |
|---|---|
| pack-priv MemoryAllocation(long address) | |
| dispose | back to summary |
|---|---|
| pack-priv final void dispose() | |
| free | back to summary |
|---|---|
| pack-priv final void free() | |