Lines Matching refs:atomCount
2325 int atomCount = 0;
2346 atomCount = tr_ptrArraySize( &t->peers );
2347 atoms = tr_new( struct peer_atom *, atomCount );
2348 for( i=0; i<atomCount; ++i )
2359 atoms[atomCount++] = atomBase[i];
2362 qsort( atoms, atomCount, sizeof( struct peer_atom * ), compareAtomsByUsefulness );
2368 n = MIN( atomCount, maxCount );
2371 for( i=0; i<atomCount && count<n; ++i )
3705 int atomCount;
3708 struct peer_atom ** atoms = (struct peer_atom**) tr_ptrArrayPeek( &t->pool, &atomCount );
3710 if( atomCount > maxAtomCount ) /* we've got too many atoms... time to prune */
3715 struct peer_atom ** keep = tr_new( struct peer_atom*, atomCount );
3716 struct peer_atom ** test = tr_new( struct peer_atom*, atomCount );
3719 for( i=0; i<atomCount; ++i ) {
3746 tordbg( t, "max atom count is %d... pruned from %d to %d\n", maxAtomCount, atomCount, keepCount );
3965 int atomCount;
3977 atomCount = 0;
3980 atomCount += tr_ptrArraySize( &tor->torrentPeers->pool );
3991 walk = candidates = tr_new( struct peer_candidate, atomCount );