mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Add QBT_APP_64BIT define
Now we use QT_POINTER_SIZE to detect CPU bitness, it has the advantage of applicable to all CPU architectures not limiting to x86 arch.
This commit is contained in:
@@ -2777,7 +2777,7 @@ int Session::diskCacheSize() const
|
||||
{
|
||||
int size = m_diskCacheSize;
|
||||
// These macros may not be available on compilers other than MSVC and GCC
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
#ifdef QBT_APP_64BIT
|
||||
size = qMin(size, 4096); // 4GiB
|
||||
#else
|
||||
// When build as 32bit binary, set the maximum at less than 2GB to prevent crashes
|
||||
@@ -2789,7 +2789,7 @@ int Session::diskCacheSize() const
|
||||
|
||||
void Session::setDiskCacheSize(int size)
|
||||
{
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
#ifdef QBT_APP_64BIT
|
||||
size = qMin(size, 4096); // 4GiB
|
||||
#else
|
||||
// allocate 1536MiB and leave 512MiB to the rest of program data in RAM
|
||||
|
||||
Reference in New Issue
Block a user