Metall
v0.33
A persistent memory allocator for data-centric analytics
Loading...
Searching...
No Matches
defs.hpp
Go to the documentation of this file.
1
// Copyright 2023 Lawrence Livermore National Security, LLC and other Metall
2
// Project Developers. See the top-level COPYRIGHT file for details.
3
//
4
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
5
8
9
#ifndef METALL_DEFS_HPP
10
#define METALL_DEFS_HPP
11
17
#ifndef METALL_MAX_CAPACITY
18
#define METALL_MAX_CAPACITY (1ULL << 47ULL)
19
#endif
20
27
#ifndef METALL_DEFAULT_CAPACITY
28
#if defined(__linux__)
29
#define METALL_DEFAULT_CAPACITY (1ULL << 43ULL)
30
#else
31
#define METALL_DEFAULT_CAPACITY (1ULL << 42ULL)
32
#endif
33
#endif
34
35
#ifdef DOXYGEN_SKIP
38
#define METALL_VERBOSE_SYSTEM_SUPPORT_WARNING
39
43
#define METALL_USE_SORTED_BIN
44
48
#define METALL_FREE_SMALL_OBJECT_SIZE_HINT
49
#endif
50
51
// --------------------
52
// Macros for the default segment storage
53
// --------------------
54
57
#ifndef METALL_SEGMENT_BLOCK_SIZE
58
#define METALL_SEGMENT_BLOCK_SIZE (1ULL << 28ULL)
59
#endif
60
61
#ifdef DOXYGEN_SKIP
64
#define METALL_DISABLE_FREE_FILE_SPACE
65
#endif
66
67
// --------------------
68
// Macros for the segment allocator
69
// --------------------
70
71
#ifdef DOXYGEN_SKIP
79
#define METALL_DISABLE_CONCURRENCY
80
#endif
81
82
// --------------------
83
// Macros for the object cache
84
// --------------------
85
86
#ifdef DOXYGEN_SKIP
88
#define METALL_DISABLE_OBJECT_CACHE
89
#endif
90
94
#ifdef DOXYGEN_SKIP
95
#define METALL_NUM_OBJECT_CACHES 2
96
#endif
97
98
#if defined(METALL_NUM_OBJECT_CACHES) && METALL_NUM_OBJECT_CACHES <= 0
99
#warning "METALL_NUM_OBJECT_CACHES must be > 0. This value is ignored."
100
#undef METALL_NUM_OBJECT_CACHES
101
#endif
102
107
#ifndef METALL_NUM_CACHES_PER_CPU
108
#define METALL_NUM_CACHES_PER_CPU 2
109
#endif
110
111
#if METALL_NUM_CACHES_PER_CPU <= 0
112
#warning "METALL_NUM_CACHES_PER_CPU must be > 0."
113
#undef METALL_NUM_CACHES_PER_CPU
114
#define METALL_NUM_CACHES_PER_CPU 2
115
#endif
116
119
#ifndef METALL_MAX_PER_CPU_CACHE_SIZE
120
#define METALL_MAX_PER_CPU_CACHE_SIZE (1ULL << 20ULL)
121
#endif
122
123
// --------------------
124
// Deprecated macros
125
126
#ifdef METALL_MAX_SEGMENT_SIZE
127
#warning \
128
"METALL_MAX_SEGMENT_SIZE is deprecated. Use METALL_MAX_CAPACITY instead."
129
#endif
130
131
#ifdef METALL_DEFAULT_VM_RESERVE_SIZE
132
#warning \
133
"METALL_DEFAULT_VM_RESERVE_SIZE is deprecated. Use METALL_DEFAULT_CAPACITY instead."
134
#endif
135
136
#ifdef METALL_INITIAL_SEGMENT_SIZE
137
#warning \
138
"METALL_INITIAL_SEGMENT_SIZE is deprecated. Use METALL_SEGMENT_BLOCK_SIZE instead."
139
#endif
140
141
#endif
// METALL_DEFS_HPP
include
metall
defs.hpp
Generated by
1.9.8