xerial.larray.buffer.OffHeapMemoryReference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of larray-buffer Show documentation
Show all versions of larray-buffer Show documentation
LArray off-heap buffer library
package xerial.larray.buffer;
import java.lang.ref.ReferenceQueue;
/**
* @author Taro L. Saito
*/
public class OffHeapMemoryReference extends MemoryReference {
/**
* Create a phantom reference
* @param m the allocated memory
* @param queue the reference queue to which GCed reference of the Memory will be inserted
*/
public OffHeapMemoryReference(Memory m, ReferenceQueue queue) {
super(m, queue);
}
public Memory toMemory() {
if(address != 0)
return new OffHeapMemory(address);
else
return new OffHeapMemory();
}
public String name() { return "off-heap"; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy