I'm working on a project using STXXL, which I understand to be an out of core version of the C++ STL library. Currently, my program is running fine with it, but the problem I'm facing now is that when the program is running, it uses close to 2GB of memory (with a low to medium sized data set).
In my program, I'm using 25 STXXL vectors, stored in individual files on disk. As for my .stxxl file, I currently have it set to dynamically allocate the disk file (by setting the disk size to 0).
So, my question is: is there a way to explicitly get STXXL to use the hard disk as opposed to RAM? Or is this amount of memory usage to be expected when using this library?
Thanks in advance for any advice anyone can provide.
What bobb_the_builder says about the RAM usage of the stxxl:vector is correct.
See the following code:
On Linux, the program's resident memory size grows to 27528 KiB when using and to about 1,6 GiB when using which is .
Does the Windows manager show the same? Is this maybe a STXXL bug only on Windows, or just does the task manager show different memory sizes?