Stxxl  1.3.2
Installation, usage, configuration (Windows – Microsoft Visual C++)

Download and Extraction

Library Compilation

Building an application

Programs using Stxxl can be compiled using options from compiler.options file (in the STXXL_ROOT directory). The linking options for the VC++ linker you can find in linker.options file. In order to accomplish this do the following:


If you use make files you can include the make.settings file in your make files and use STXXL_COMPILER_OPTIONS and STXXL_LINKER_OPTIONS variables, defined therein.

For example:

cl -c my_example.cpp $(STXXL_COMPILER_OPTIONS) 


link my_example.obj /out:my_example.exe $(STXXL_LINKER_OPTIONS) 


The STXXL_ROOT\test\WinGUI directory contains an example MFC GUI project that uses Stxxl. In order to compile it open the WinGUI.vcproj file in Visual Studio .NET. Change if needed the Compiler and Linker Options of the project (see above).

Before you try to run one of the STXXL examples (or your own STXXL program) you must configure the disk space that will be used as external memory for the library. For instructions how to do that, see the next section.

Disk space

To get best performance with STXXL you should assign separate disks to it. These disks should be used by the library only. Since STXXL is developed to exploit disk parallelism, the performance of your external memory application will increase if you use more than one disk. But from how many disks your application can benefit depends on how "I/O bound" it is. With modern disk bandwidths of about 50-75 MiB/s most of applications are I/O bound for one disk. This means that if you add another disk the running time will be halved. Adding more disks might also increase performance significantly.

Disk configuration file

You must define the disk configuration for an STXXL program in a file named '.stxxl' that must reside in the same directory where you execute the program. You can change the default file name for the configuration file by setting the environment variable STXXLCFG .

Each line of the configuration file describes a disk. A disk description uses the following format:
disk=full_disk_filename,capacity,access_method

Description of the parameters:

See also the example configuration file 'config_example_win' included in the archive.

Precreating external memory files

In order to get the maximum performance one should precreate disk files described in the configuration file, before running STXXL applications.

The precreation utility is included in the set of STXXL utilities ( utils\createdisks.exe ). Run this utility for each disk you have defined in the disk configuration file:

utils\createdisks.exe capacity full_disk_filename...