1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Should fix writings on NTFS when using Linux

This commit is contained in:
Christophe Dumez 2011-03-03 19:10:18 +00:00
parent efa1f4ebb4
commit d1cfb4f066

View File

@ -389,9 +389,12 @@ void QBtSession::configureSession() {
sessionSettings.cache_size = pref.diskCacheSize()*64; sessionSettings.cache_size = pref.diskCacheSize()*64;
qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB"; qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB";
// Disable OS cache to avoid memory problems (uTorrent behavior) // Disable OS cache to avoid memory problems (uTorrent behavior)
#ifdef Q_WS_WIN
#if LIBTORRENT_VERSION_MINOR > 14 #if LIBTORRENT_VERSION_MINOR > 14
// Fixes huge memory usage on Windows 7 (especially when checking files)
sessionSettings.disk_io_write_mode = session_settings::disable_os_cache_for_aligned_files; sessionSettings.disk_io_write_mode = session_settings::disable_os_cache_for_aligned_files;
sessionSettings.disk_io_read_mode = session_settings::disable_os_cache_for_aligned_files; sessionSettings.disk_io_read_mode = session_settings::disable_os_cache_for_aligned_files;
#endif
#endif #endif
// Queueing System // Queueing System
if(pref.isQueueingSystemEnabled()) { if(pref.isQueueingSystemEnabled()) {