Metall  v0.28
A persistent memory allocator for data-centric analytics
defs.hpp File Reference

Common definitions for Metall. More...

Go to the source code of this file.

Macros

#define METALL_MAX_CAPACITY   (1ULL << 47ULL)
 
#define METALL_DEFAULT_CAPACITY   (1ULL << 42ULL)
 
#define METALL_VERBOSE_SYSTEM_SUPPORT_WARNING
 If defined, Metall shows warning messages at compile time if the system does not support important features. More...
 
#define METALL_USE_SORTED_BIN
 If defined, Metall stores addresses in sorted order in the bin directory. This option enables Metall to use memory space more efficiently, but it increases the cost of the bin directory operations. More...
 
#define METALL_FREE_SMALL_OBJECT_SIZE_HINT
 If defined, Metall tries to free space when an object equal to or larger than the specified bytes is deallocated. Will be rounded up to a multiple of the page size internally. More...
 
#define METALL_SEGMENT_BLOCK_SIZE   (1ULL << 28ULL)
 
#define METALL_DISABLE_FREE_FILE_SPACE
 If defined, the default segment storage does not free file space even thought the corresponding segment becomes free. More...
 
#define METALL_MAX_PER_CPU_CACHE_SIZE   (1ULL << 20ULL)
 
#define METALL_NUM_CACHES_PER_CPU   2
 
#define METALL_DISABLE_CONCURRENCY
 A macro to disable concurrency support. More...
 

Detailed Description

Common definitions for Metall.

Macro Definition Documentation

◆ METALL_MAX_CAPACITY

#define METALL_MAX_CAPACITY   (1ULL << 47ULL)

The max capacity, i.e., the maximum total memory size a single Metall datastore can allocate. This value is a theoretical limit, and the actual limit is smaller than this value. This value is used to determine the types of some internal variables.

◆ METALL_DEFAULT_CAPACITY

#define METALL_DEFAULT_CAPACITY   (1ULL << 42ULL)

The default Metall store capacity, i.e., the default maximum total memory size a single Metall datastore can allocate. This value is used when a new Metall datastore is created without the capacity parameter. This value is a theoretical limit, and the actual limit is smaller than this value. This value must be less than or equal to METALL_MAX_CAPACITY.

◆ METALL_VERBOSE_SYSTEM_SUPPORT_WARNING

#define METALL_VERBOSE_SYSTEM_SUPPORT_WARNING

If defined, Metall shows warning messages at compile time if the system does not support important features.

◆ METALL_USE_SORTED_BIN

#define METALL_USE_SORTED_BIN

If defined, Metall stores addresses in sorted order in the bin directory. This option enables Metall to use memory space more efficiently, but it increases the cost of the bin directory operations.

◆ METALL_FREE_SMALL_OBJECT_SIZE_HINT

#define METALL_FREE_SMALL_OBJECT_SIZE_HINT

If defined, Metall tries to free space when an object equal to or larger than the specified bytes is deallocated. Will be rounded up to a multiple of the page size internally.

◆ METALL_SEGMENT_BLOCK_SIZE

#define METALL_SEGMENT_BLOCK_SIZE   (1ULL << 28ULL)

The segment block size the default segment storage use.

◆ METALL_DISABLE_FREE_FILE_SPACE

#define METALL_DISABLE_FREE_FILE_SPACE

If defined, the default segment storage does not free file space even thought the corresponding segment becomes free.

◆ METALL_MAX_PER_CPU_CACHE_SIZE

#define METALL_MAX_PER_CPU_CACHE_SIZE   (1ULL << 20ULL)

The maximum size of the per CPU (logical CPU core) cache in bytes.

◆ METALL_NUM_CACHES_PER_CPU

#define METALL_NUM_CACHES_PER_CPU   2

The number of caches per CPU (logical CPU core).

◆ METALL_DISABLE_CONCURRENCY

#define METALL_DISABLE_CONCURRENCY

A macro to disable concurrency support.

If this macro is defined, Metall disables concurrency support and optimizes the internal behavior for single-thread usage. Applications must not call any Metall functions concurrently if this macro is defined. On the other hand, Metall still may use multi-threading for internal operations, such as synchronizing data with files.