Ignore:
Timestamp:
Jan 2, 2009, 8:42:35 PM (14 years ago)
Author:
charles
Message:

(trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_ratecontrol, contain the it directly rather than a pointer to one allocated elsewhere on the heap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r7578 r7584  
    502502    tr_torrentInitFilePieces( tor );
    503503
    504     tor->swarmSpeed = tr_rcInit( );
     504    tr_rcConstruct( &tor->swarmSpeed );
    505505
    506506    tr_sha1( tor->obfuscatedHash, "req2", 4,
     
    793793                       : 0.0;
    794794
    795     s->swarmSpeed = tr_rcRate( tor->swarmSpeed );
     795    s->swarmSpeed = tr_rcRate( &tor->swarmSpeed );
    796796
    797797    s->activityDate = tor->activityDate;
     
    10351035    tr_cpDestruct( &tor->completion );
    10361036
    1037     tr_rcClose( tor->swarmSpeed );
     1037    tr_rcDestruct( &tor->swarmSpeed );
    10381038
    10391039    tr_trackerUnsubscribe( tor->tracker, tor->trackerSubscription );
Note: See TracChangeset for help on using the changeset viewer.