Metall  v0.29
A persistent memory allocator for data-centric analytics
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 object cache
69 // --------------------
70 
73 #ifndef METALL_MAX_PER_CPU_CACHE_SIZE
74 #define METALL_MAX_PER_CPU_CACHE_SIZE (1ULL << 20ULL)
75 #endif
76 
79 #ifndef METALL_NUM_CACHES_PER_CPU
80 #define METALL_NUM_CACHES_PER_CPU 2
81 #endif
82 
83 #ifdef DOXYGEN_SKIP
91 #define METALL_DISABLE_CONCURRENCY
92 #endif
93 
94 // --------------------
95 // Deprecated macros
96 
97 #ifdef METALL_MAX_SEGMENT_SIZE
98 #warning \
99  "METALL_MAX_SEGMENT_SIZE is deprecated. Use METALL_MAX_CAPACITY instead."
100 #endif
101 
102 #ifdef METALL_DEFAULT_VM_RESERVE_SIZE
103 #warning \
104  "METALL_DEFAULT_VM_RESERVE_SIZE is deprecated. Use METALL_DEFAULT_CAPACITY instead."
105 #endif
106 
107 #ifdef METALL_INITIAL_SEGMENT_SIZE
108 #warning \
109  "METALL_INITIAL_SEGMENT_SIZE is deprecated. Use METALL_SEGMENT_BLOCK_SIZE instead."
110 #endif
111 
112 #endif // METALL_DEFS_HPP