void maybeClean() { if (needsCleaning() && cleaner != null) cleaner.trigger(); }
SlabAllocator(SubAllocator onHeap, SubAllocator offHeap, boolean allocateOnHeapOnly) { super(onHeap, offHeap); this.allocateOnHeapOnly = allocateOnHeapOnly; this.ensureOnHeap = allocateOnHeapOnly ? new EnsureOnHeap.NoOp() : new EnsureOnHeap.CloneToHeap(); }
/** * Mark this allocator reclaiming; this will permit any outstanding allocations to temporarily * overshoot the maximum memory limit so that flushing can begin immediately */ public void setDiscarding() { state = state.transition(LifeCycle.DISCARDING); // mark the memory owned by this allocator as reclaiming onHeap.markAllReclaiming(); offHeap.markAllReclaiming(); }
public MemtableAllocator newAllocator() { return new SlabAllocator(onHeap.newAllocator(), offHeap.newAllocator(), allocateOnHeap); } }
/** * Indicate the memory and resources owned by this allocator are no longer referenced, * and can be reclaimed/reused. */ public void setDiscarded() { state = state.transition(LifeCycle.DISCARDED); // release any memory owned by this allocator; automatically signals waiters onHeap.releaseAll(); offHeap.releaseAll(); }
public void setDiscarded() { for (Region region : regions) MemoryUtil.free(region.peer); super.setDiscarded(); }
void maybeClean() { if (needsCleaning() && cleaner != null) cleaner.trigger(); }
/** * Mark this allocator reclaiming; this will permit any outstanding allocations to temporarily * overshoot the maximum memory limit so that flushing can begin immediately */ public void setDiscarding() { state = state.transition(LifeCycle.DISCARDING); // mark the memory owned by this allocator as reclaiming onHeap.markAllReclaiming(); offHeap.markAllReclaiming(); }
public MemtableAllocator newAllocator() { return new SlabAllocator(onHeap.newAllocator(), offHeap.newAllocator(), allocateOnHeap); } }
SlabAllocator(SubAllocator onHeap, SubAllocator offHeap, boolean allocateOnHeapOnly) { super(onHeap, offHeap); this.allocateOnHeapOnly = allocateOnHeapOnly; this.ensureOnHeap = allocateOnHeapOnly ? new EnsureOnHeap.NoOp() : new EnsureOnHeap.CloneToHeap(); }
public void setDiscarded() { for (Region region : regions) MemoryUtil.free(region.peer); super.setDiscarded(); }
SlabAllocator(SubAllocator onHeap, SubAllocator offHeap, boolean allocateOnHeapOnly) { super(onHeap, offHeap); this.allocateOnHeapOnly = allocateOnHeapOnly; this.ensureOnHeap = allocateOnHeapOnly ? new EnsureOnHeap.NoOp() : new EnsureOnHeap.CloneToHeap(); }