Changeset 7551


Ignore:
Timestamp:
Dec 30, 2008, 9:18:30 PM (12 years ago)
Author:
charles
Message:

(trunk libT) blockIteratorNew() was overallocating much more memory than it used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r7545 r7551  
    688688    i->t = t;
    689689    i->pieces = getPreferredPieces( t, &i->pieceCount );
    690     i->blocks = tr_new0( tr_block_index_t, t->tor->blockCount );
     690    i->blocks = tr_new0( tr_block_index_t, t->tor->blockCountInPiece );
    691691    return i;
    692692}
     
    715715                i->blocks[i->blockCount++] = block;
    716716    }
     717
     718    assert( i->blockCount <= tor->blockCountInPiece );
    717719
    718720    if(( found = ( i->blockIndex < i->blockCount )))
Note: See TracChangeset for help on using the changeset viewer.