Skip to content

Commit

Permalink
set lower memory priority for disk I/O threads on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Feb 14, 2022
1 parent 9218903 commit c070e0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mmap_disk_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,10 +1547,10 @@ TORRENT_EXPORT std::unique_ptr<disk_interface> mmap_disk_io_constructor(
struct MPI {
ULONG MemoryPriority;
};
#ifndef MEMORY_PRIORITY_BELOW_NORMAL
ULONG const MEMORY_PRIORITY_BELOW_NORMAL = 4;
#ifndef MEMORY_PRIORITY_LOW
ULONG const MEMORY_PRIORITY_LOW = 2;
#endif
MPI info{MEMORY_PRIORITY_BELOW_NORMAL};
MPI info{MEMORY_PRIORITY_LOW};
SetThreadInformation(GetCurrentThread(), ThreadMemoryPriority
, &info, sizeof(info));
}
Expand Down

0 comments on commit c070e0a

Please sign in to comment.