@Namespace(value="tflite") @NoOffset @Properties(inherit=tensorflowlite.class) public class MemoryAllocation extends Allocation
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
kFileCopy, kMemory, kMMap
Constructor and Description |
---|
MemoryAllocation(Pointer p)
Pointer cast constructor.
|
MemoryAllocation(Pointer ptr,
long num_bytes,
ErrorReporter error_reporter)
Provides a (read-only) view of the provided buffer region as an
allocation.
|
Modifier and Type | Method and Description |
---|---|
Pointer |
base()
Base pointer of this allocation
|
long |
bytes()
Size in bytes of the allocation
|
boolean |
valid()
Whether the allocation is valid
|
type
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public MemoryAllocation(Pointer p)
Pointer(Pointer)
.public MemoryAllocation(@Const Pointer ptr, @Cast(value="size_t") long num_bytes, ErrorReporter error_reporter)
ptr
, and must ensure it remains
valid for the lifetime of the class instance.@Const public Pointer base()
Allocation
base
in class Allocation
@Cast(value="size_t") public long bytes()
Allocation
bytes
in class Allocation
@Cast(value="bool") public boolean valid()
Allocation
valid
in class Allocation
Copyright © 2025. All rights reserved.