Package jnr.ffi.provider.jffi
Class TransientNativeMemory.Magazine
- java.lang.Object
-
- java.lang.ref.Reference<T>
-
- java.lang.ref.PhantomReference<T>
-
- jnr.ffi.util.ref.FinalizablePhantomReference<TransientNativeMemory.Sentinel>
-
- jnr.ffi.provider.jffi.TransientNativeMemory.Magazine
-
- All Implemented Interfaces:
FinalizableReference
- Enclosing class:
- TransientNativeMemory
private static final class TransientNativeMemory.Magazine extends FinalizablePhantomReference<TransientNativeMemory.Sentinel>
Holder for a group of memory allocations.
-
-
Field Summary
Fields Modifier and Type Field Description private long
end
private long
memory
private long
page
private int
pageCount
private com.kenai.jffi.PageManager
pm
private java.lang.ref.Reference<TransientNativeMemory.Sentinel>
sentinelReference
-
Constructor Summary
Constructors Constructor Description Magazine(TransientNativeMemory.Sentinel sentinel, com.kenai.jffi.PageManager pm, long page, int pageCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) long
allocate(int size, int align)
void
finalizeReferent()
Invoked on a background thread after the referent has been garbage collected unless security restrictions prevented starting a background thread, in which case this method is invoked when new references are created.(package private) TransientNativeMemory.Sentinel
sentinel()
-
-
-
Field Detail
-
sentinelReference
private final java.lang.ref.Reference<TransientNativeMemory.Sentinel> sentinelReference
-
pm
private final com.kenai.jffi.PageManager pm
-
page
private final long page
-
end
private final long end
-
pageCount
private final int pageCount
-
memory
private long memory
-
-
Constructor Detail
-
Magazine
Magazine(TransientNativeMemory.Sentinel sentinel, com.kenai.jffi.PageManager pm, long page, int pageCount)
-
-
Method Detail
-
sentinel
TransientNativeMemory.Sentinel sentinel()
-
allocate
long allocate(int size, int align)
-
finalizeReferent
public final void finalizeReferent()
Description copied from interface:FinalizableReference
Invoked on a background thread after the referent has been garbage collected unless security restrictions prevented starting a background thread, in which case this method is invoked when new references are created.
-
-