コード例 #1
0
ファイル: GATDataAllocator.cs プロジェクト: uniphonic/G-Audio
        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
ファイル: GATDataAllocator.cs プロジェクト: uniphonic/G-Audio
 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
ファイル: GATDataAllocator.cs プロジェクト: gregzo/G-Audio
        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 );
        }