use of org.neo4j.internal.unsafe.NativeMemoryAllocationRefusedError in project neo4j by neo4j.
the class UnsafeDirectByteBufferAllocator method allocate.
@Override
public synchronized ScopedBuffer allocate(int bufferSize, MemoryTracker memoryTracker) {
assertOpen();
try {
var byteBuffer = new NativeScopedBuffer(bufferSize, memoryTracker);
allocations.add(byteBuffer);
return byteBuffer;
} catch (NativeMemoryAllocationRefusedError allocationRefusedError) {
// What ever went wrong fallback to on-heap buffer.
return new HeapScopedBuffer(bufferSize, memoryTracker);
}
}
Aggregations