bool Ensure(long len) { long blocksNeeded = (len + kBlockSize - 1) >> kBlockSizeBits; while (mBlocks.Count < blocksNeeded) { var block = new AWEMemoryBlock(); if (!block.Allocate(kBlockSize)) { return(false); } mBlocks.Add(block); } return(true); }
bool Ensure(long len) { long blocksNeeded = (len + kBlockSize - 1) >> kBlockSizeBits; while (mBlocks.Count < blocksNeeded) { var block = new AWEMemoryBlock(); if (!block.Allocate(kBlockSize)) return false; mBlocks.Add(block); } return true; }