public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size, opGroup); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }