예제 #1
0
        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);
        }
예제 #2
0
 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);
 }
예제 #3
0
        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 );
        }