Closed barkoder closed 1 month ago
https://github.com/majestrate/XD/blob/master/lib/util/ensurefile.go#L21
this is what we do instead of fallocate as windows lacks an ability to do sparse allocation. i'd have to totally redo storage in XD to accommodate this feature request.
I see. If this is the case, please consider listing this issue as a "Windows limitation", in bold , both here https://xd-torrent.github.io/ and https://github.com/majestrate/XD .
That sudden spike in RAM usage got me dangerously close to running out of memory.
It would help Windows users with low RAM avoid catastrophe, in case they try to torrent a 25 GB file with 8GB of RAM.
Thanks!
version: 0.4.6
OS: Windows 7 x64 SP1 with VxKex
Error messages: no
Backtrace: no
Steps to reproduce:
Install xd 0.4.6.
Create a torrent with a single 5GB file.
Open a free memory monitor, like Task Manager, or something else.
Move torrent file to the
downloads
directory.Notice the sudden ~5GB spike in RAM usage.
I noticed that the size of the spike in memory is about the same as the size of the file in the torrent. The memory usage of
xd
stays pretty much the same, butxd
appears to be doing some sort of caching before pre-allocating the space on disk.I would appreciate a way to turn off caching in RAM and pre-allocation.
Thanks!
Also this issue is not related to #44 .