APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.foreign

public final Class SlicingAllocator

extends Object
implements SegmentAllocator
Class Inheritance
All Implemented Interfaces
java.lang.foreign.SegmentAllocator
Imports
java.lang.foreign.MemorySegment, .SegmentAllocator

Field Summary

Modifier and TypeField and Description
private final MemorySegment
private long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public MemorySegment
allocate(long byteSize, long byteAlignment)

Implements java.lang.foreign.SegmentAllocator.allocate.

Returns a new memory segment with the given byteSize and byteAlignment.

public boolean
canAllocate(long byteSize, long byteAlignment)

public long
public void
resetTo(long offset)

pack-priv MemorySegment
trySlice(long byteSize, long byteAlignment)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

segmentback to summary
private final MemorySegment segment
spback to summary
private long sp

Constructor Detail

SlicingAllocatorback to summary
public SlicingAllocator(MemorySegment segment)

Method Detail

allocateback to summary
public MemorySegment allocate(long byteSize, long byteAlignment)

Implements java.lang.foreign.SegmentAllocator.allocate.

Doc from java.lang.foreign.SegmentAllocator.allocate.

Returns a new memory segment with the given byteSize and byteAlignment.

Annotations
@Override
canAllocateback to summary
public boolean canAllocate(long byteSize, long byteAlignment)
currentOffsetback to summary
public long currentOffset()
resetToback to summary
public void resetTo(long offset)
trySliceback to summary
pack-priv MemorySegment trySlice(long byteSize, long byteAlignment)