public int freeBlocks(int num) {assert num >= 0 : "free blocks must be >= 0 but was: "+ num;final int stop;final int count;if (num > freeBlocks) {stop = 0;count = freeBlocks;} else {stop = freeBlocks - num;count = num;}while (freeBlocks > stop) {freeByteBlocks[--freeBlocks] = null;}bytesUsed.addAndGet(-count*blockSize);assert bytesUsed.get() >= 0;return count;}
public int FreeBlocks(int num){Debug.Assert(num >= 0, "free blocks must be >= 0 but was: " + num);int stop;int count;if (num > freeBlocks){stop = 0;count = freeBlocks;}else{stop = freeBlocks - num;count = num;}while (freeBlocks > stop){freeByteBlocks[--freeBlocks] = null;}bytesUsed.AddAndGet(-count * m_blockSize);Debug.Assert(bytesUsed.Get() >= 0);return count;}