Changeset 2144
- Timestamp:
- Jun 18, 2007, 1:28:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/file_selection/libtransmission/makemeta.c
r2143 r2144 91 91 } 92 92 93 #define MiB 1048576ul94 #define GiB 1073741824ul95 93 96 94 static int 97 95 bestPieceSize( uint64_t totalSize ) 98 96 { 97 const int MiB = 1048576; 98 const int GiB = totalSize / (uint64_t)1073741824; 99 99 100 /* almost always best to have a piee size of 512 or 256 kb. 100 101 common practice seems to be to bump up to 1MB pieces at 101 102 at total size of around 8GiB or so */ 102 103 103 if (totalSize >= (8 * GiB))104 if( GiB >= 8 ) 104 105 return MiB; 105 106 106 if (totalSize >= GiB)107 if( GiB >= 1 ) 107 108 return MiB / 2; 108 109
Note: See TracChangeset
for help on using the changeset viewer.