mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 14:12:30 -06:00
Allow to use POSIX-compliant disk IO type
This patch allows user to switch disk IO type between memory mapped files based type (default in libtorrent 2, and seems causing memory issues) and POSIX-compliant type which is more conservative on memory usage. Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com> Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru> PR #16895.
This commit is contained in:
@@ -122,6 +122,14 @@ namespace BitTorrent
|
||||
};
|
||||
Q_ENUM_NS(ChokingAlgorithm)
|
||||
|
||||
enum class DiskIOType : int
|
||||
{
|
||||
Default = 0,
|
||||
MMap = 1,
|
||||
Posix = 2
|
||||
};
|
||||
Q_ENUM_NS(DiskIOType)
|
||||
|
||||
enum class MixedModeAlgorithm : int
|
||||
{
|
||||
TCP = 0,
|
||||
@@ -368,6 +376,8 @@ namespace BitTorrent
|
||||
void setDiskCacheTTL(int ttl);
|
||||
qint64 diskQueueSize() const;
|
||||
void setDiskQueueSize(qint64 size);
|
||||
DiskIOType diskIOType() const;
|
||||
void setDiskIOType(DiskIOType type);
|
||||
bool useOSCache() const;
|
||||
void setUseOSCache(bool use);
|
||||
bool isCoalesceReadWriteEnabled() const;
|
||||
@@ -689,6 +699,7 @@ namespace BitTorrent
|
||||
CachedSettingValue<int> m_diskCacheSize;
|
||||
CachedSettingValue<int> m_diskCacheTTL;
|
||||
CachedSettingValue<qint64> m_diskQueueSize;
|
||||
CachedSettingValue<DiskIOType> m_diskIOType;
|
||||
CachedSettingValue<bool> m_useOSCache;
|
||||
CachedSettingValue<bool> m_coalesceReadWriteEnabled;
|
||||
CachedSettingValue<bool> m_usePieceExtentAffinity;
|
||||
|
||||
Reference in New Issue
Block a user