private void InitCursors() { _endCursor = new GATFixedData(this, ""); _endCursor.AllocateFree(_mainBuffer.Length, null); _unallocatedCursor = new GATManagedData(this); _unallocatedCursor.AllocateFree(0, _endCursor); _firstCursor = new GATManagedData(this); _firstCursor.AllocateFree(0, _unallocatedCursor); }
bool TryFragmentBins(int fromBinIndex, int binSize, ref GATManagedData chunk) { for (int i = fromBinIndex; i < _nbOfBins; i++) { if (_freeChunksBins[i].Count != 0) { chunk = _freeChunksBins[i].Pop(); GATManagedData subChunk = GetOrMakeChunk(); subChunk.AllocateFree(chunk.MemOffset + binSize, chunk.next); chunk.next = subChunk; AddToFreeChunksBins(subChunk); return(true); } } return(false); }
private void InitCursors() { _endCursor = new GATFixedData( this, "" ); _endCursor.AllocateFree( _mainBuffer.Length, null ); _unallocatedCursor = new GATManagedData( this ); _unallocatedCursor.AllocateFree( 0, _endCursor ); _firstCursor = new GATManagedData( this ); _firstCursor.AllocateFree( 0, _unallocatedCursor ); }