private Chunk basicAllocate(int idx, int multiple, int offset, AtomicReferenceArray<SyncChunkStack> freeLists, boolean useFragments, ChunkType chunkType) {
SyncChunkStack clq = freeLists.get(idx);
if (clq != null) {
long memAddr = clq.poll();
if (memAddr != 0) {
Chunk result = SimpleMemoryAllocatorImpl.this.chunkFactory.newChunk(memAddr, chunkType);
if(validateMemoryWithFill) {
result.validateFill(SimpleMemoryAllocatorImpl.this.TINY_MULTIPLE);
}
result.readyForAllocation(chunkType);
return result;
}
}
if (useFragments) {
return allocateFromFragments(((idx+1)*multiple)+offset, chunkType);
} else {
return null;
}
}
private Chunk allocateHuge(int size, boolean useFragments, ChunkType chunkType) {