@based/db 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/lib/darwin_aarch64/libnode-v22.node +0 -0
  2. package/dist/lib/darwin_aarch64/libnode-v23.node +0 -0
  3. package/dist/lib/darwin_aarch64/libnode-v24.node +0 -0
  4. package/dist/lib/darwin_aarch64/libnode-v25.node +0 -0
  5. package/dist/lib/darwin_aarch64/libselva.dylib +0 -0
  6. package/dist/lib/linux_aarch64/include/cdefs.h +324 -0
  7. package/dist/lib/linux_aarch64/include/jemalloc.h +468 -0
  8. package/dist/lib/linux_aarch64/include/libdeflate.h +345 -0
  9. package/dist/lib/linux_aarch64/include/libdeflate_strings.h +35 -0
  10. package/dist/lib/linux_aarch64/include/linker_set.h +109 -0
  11. package/dist/lib/linux_aarch64/include/queue.h +627 -0
  12. package/dist/lib/linux_aarch64/include/selva/_export.h +7 -0
  13. package/dist/lib/linux_aarch64/include/selva/align.h +9 -0
  14. package/dist/lib/linux_aarch64/include/selva/backoff_timeout.h +29 -0
  15. package/dist/lib/linux_aarch64/include/selva/bitmap.h +95 -0
  16. package/dist/lib/linux_aarch64/include/selva/colvec.h +71 -0
  17. package/dist/lib/linux_aarch64/include/selva/crc32c.h +17 -0
  18. package/dist/lib/linux_aarch64/include/selva/ctime.h +135 -0
  19. package/dist/lib/linux_aarch64/include/selva/db.h +450 -0
  20. package/dist/lib/linux_aarch64/include/selva/endian.h +301 -0
  21. package/dist/lib/linux_aarch64/include/selva/fast_linear_search.h +27 -0
  22. package/dist/lib/linux_aarch64/include/selva/fast_memcmp.h +18 -0
  23. package/dist/lib/linux_aarch64/include/selva/fast_memmem.h +11 -0
  24. package/dist/lib/linux_aarch64/include/selva/fast_parsei.h +36 -0
  25. package/dist/lib/linux_aarch64/include/selva/fields.h +341 -0
  26. package/dist/lib/linux_aarch64/include/selva/gmtime.h +137 -0
  27. package/dist/lib/linux_aarch64/include/selva/hll.h +85 -0
  28. package/dist/lib/linux_aarch64/include/selva/lpf.h +28 -0
  29. package/dist/lib/linux_aarch64/include/selva/mblen.h +40 -0
  30. package/dist/lib/linux_aarch64/include/selva/membar.h +32 -0
  31. package/dist/lib/linux_aarch64/include/selva/node_id_set.h +43 -0
  32. package/dist/lib/linux_aarch64/include/selva/poptop.h +114 -0
  33. package/dist/lib/linux_aarch64/include/selva/selva_hash128.h +49 -0
  34. package/dist/lib/linux_aarch64/include/selva/selva_lang.h +112 -0
  35. package/dist/lib/linux_aarch64/include/selva/selva_math.h +37 -0
  36. package/dist/lib/linux_aarch64/include/selva/selva_string.h +683 -0
  37. package/dist/lib/linux_aarch64/include/selva/sort.h +140 -0
  38. package/dist/lib/linux_aarch64/include/selva/strsearch.h +43 -0
  39. package/dist/lib/linux_aarch64/include/selva/thread.h +37 -0
  40. package/dist/lib/linux_aarch64/include/selva/timestamp.h +25 -0
  41. package/dist/lib/linux_aarch64/include/selva/types.h +115 -0
  42. package/dist/lib/linux_aarch64/include/selva/vector.h +35 -0
  43. package/dist/lib/linux_aarch64/include/selva_error.h +140 -0
  44. package/dist/lib/linux_aarch64/include/selva_lang_code.h +160 -0
  45. package/dist/lib/linux_aarch64/include/tree.h +852 -0
  46. package/dist/lib/linux_aarch64/libdeflate.so +0 -0
  47. package/dist/lib/linux_aarch64/libjemalloc_selva.so.2 +0 -0
  48. package/dist/lib/linux_aarch64/libnode-v22.node +0 -0
  49. package/dist/lib/linux_aarch64/libnode-v23.node +0 -0
  50. package/dist/lib/linux_aarch64/libnode-v24.node +0 -0
  51. package/dist/lib/linux_aarch64/libnode-v25.node +0 -0
  52. package/dist/lib/linux_aarch64/libselva.so +0 -0
  53. package/dist/lib/linux_aarch64/libxxhash.so.0 +0 -0
  54. package/dist/lib/linux_x86_64/include/cdefs.h +324 -0
  55. package/dist/lib/linux_x86_64/include/jemalloc.h +468 -0
  56. package/dist/lib/linux_x86_64/include/libdeflate.h +345 -0
  57. package/dist/lib/linux_x86_64/include/libdeflate_strings.h +35 -0
  58. package/dist/lib/linux_x86_64/include/linker_set.h +109 -0
  59. package/dist/lib/linux_x86_64/include/queue.h +627 -0
  60. package/dist/lib/linux_x86_64/include/selva/_export.h +7 -0
  61. package/dist/lib/linux_x86_64/include/selva/align.h +9 -0
  62. package/dist/lib/linux_x86_64/include/selva/backoff_timeout.h +29 -0
  63. package/dist/lib/linux_x86_64/include/selva/bitmap.h +95 -0
  64. package/dist/lib/linux_x86_64/include/selva/colvec.h +71 -0
  65. package/dist/lib/linux_x86_64/include/selva/crc32c.h +17 -0
  66. package/dist/lib/linux_x86_64/include/selva/ctime.h +135 -0
  67. package/dist/lib/linux_x86_64/include/selva/db.h +450 -0
  68. package/dist/lib/linux_x86_64/include/selva/endian.h +301 -0
  69. package/dist/lib/linux_x86_64/include/selva/fast_linear_search.h +27 -0
  70. package/dist/lib/linux_x86_64/include/selva/fast_memcmp.h +18 -0
  71. package/dist/lib/linux_x86_64/include/selva/fast_memmem.h +11 -0
  72. package/dist/lib/linux_x86_64/include/selva/fast_parsei.h +36 -0
  73. package/dist/lib/linux_x86_64/include/selva/fields.h +341 -0
  74. package/dist/lib/linux_x86_64/include/selva/gmtime.h +137 -0
  75. package/dist/lib/linux_x86_64/include/selva/hll.h +85 -0
  76. package/dist/lib/linux_x86_64/include/selva/lpf.h +28 -0
  77. package/dist/lib/linux_x86_64/include/selva/mblen.h +40 -0
  78. package/dist/lib/linux_x86_64/include/selva/membar.h +32 -0
  79. package/dist/lib/linux_x86_64/include/selva/node_id_set.h +43 -0
  80. package/dist/lib/linux_x86_64/include/selva/poptop.h +114 -0
  81. package/dist/lib/linux_x86_64/include/selva/selva_hash128.h +49 -0
  82. package/dist/lib/linux_x86_64/include/selva/selva_lang.h +112 -0
  83. package/dist/lib/linux_x86_64/include/selva/selva_math.h +37 -0
  84. package/dist/lib/linux_x86_64/include/selva/selva_string.h +683 -0
  85. package/dist/lib/linux_x86_64/include/selva/sort.h +140 -0
  86. package/dist/lib/linux_x86_64/include/selva/strsearch.h +43 -0
  87. package/dist/lib/linux_x86_64/include/selva/thread.h +37 -0
  88. package/dist/lib/linux_x86_64/include/selva/timestamp.h +25 -0
  89. package/dist/lib/linux_x86_64/include/selva/types.h +115 -0
  90. package/dist/lib/linux_x86_64/include/selva/vector.h +35 -0
  91. package/dist/lib/linux_x86_64/include/selva_error.h +140 -0
  92. package/dist/lib/linux_x86_64/include/selva_lang_code.h +160 -0
  93. package/dist/lib/linux_x86_64/include/tree.h +852 -0
  94. package/dist/lib/linux_x86_64/libdeflate.so +0 -0
  95. package/dist/lib/linux_x86_64/libjemalloc_selva.so.2 +0 -0
  96. package/dist/lib/linux_x86_64/libnode-v22.node +0 -0
  97. package/dist/lib/linux_x86_64/libnode-v23.node +0 -0
  98. package/dist/lib/linux_x86_64/libnode-v24.node +0 -0
  99. package/dist/lib/linux_x86_64/libnode-v25.node +0 -0
  100. package/dist/lib/linux_x86_64/libselva.so +0 -0
  101. package/dist/lib/linux_x86_64/libxxhash.so.0 +0 -0
  102. package/package.json +1 -1
@@ -0,0 +1,468 @@
1
+ #ifndef JEMALLOC_H_
2
+ #define JEMALLOC_H_
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ /* Defined if __attribute__((...)) syntax is supported. */
8
+ #define JEMALLOC_HAVE_ATTR
9
+
10
+ /* Defined if alloc_size attribute is supported. */
11
+ #define JEMALLOC_HAVE_ATTR_ALLOC_SIZE
12
+
13
+ /* Defined if format_arg(...) attribute is supported. */
14
+ #define JEMALLOC_HAVE_ATTR_FORMAT_ARG
15
+
16
+ /* Defined if format(gnu_printf, ...) attribute is supported. */
17
+ /* #undef JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF */
18
+
19
+ /* Defined if format(printf, ...) attribute is supported. */
20
+ #define JEMALLOC_HAVE_ATTR_FORMAT_PRINTF
21
+
22
+ /* Defined if fallthrough attribute is supported. */
23
+ #define JEMALLOC_HAVE_ATTR_FALLTHROUGH
24
+
25
+ /* Defined if cold attribute is supported. */
26
+ #define JEMALLOC_HAVE_ATTR_COLD
27
+
28
+ /*
29
+ * Define overrides for non-standard allocator-related functions if they are
30
+ * present on the system.
31
+ */
32
+ /* #undef JEMALLOC_OVERRIDE_MEMALIGN */
33
+ #define JEMALLOC_OVERRIDE_VALLOC
34
+
35
+ /*
36
+ * At least Linux omits the "const" in:
37
+ *
38
+ * size_t malloc_usable_size(const void *ptr);
39
+ *
40
+ * Match the operating system's prototype.
41
+ */
42
+ #define JEMALLOC_USABLE_SIZE_CONST const
43
+
44
+ /*
45
+ * If defined, specify throw() for the public function prototypes when compiling
46
+ * with C++. The only justification for this is to match the prototypes that
47
+ * glibc defines.
48
+ */
49
+ /* #undef JEMALLOC_USE_CXX_THROW */
50
+
51
+ #ifdef _MSC_VER
52
+ # ifdef _WIN64
53
+ # define LG_SIZEOF_PTR_WIN 3
54
+ # else
55
+ # define LG_SIZEOF_PTR_WIN 2
56
+ # endif
57
+ #endif
58
+
59
+ /* sizeof(void *) == 2^LG_SIZEOF_PTR. */
60
+ #define LG_SIZEOF_PTR 3
61
+
62
+ /*
63
+ * Name mangling for public symbols is controlled by --with-mangling and
64
+ * --with-jemalloc-prefix. With default settings the je_ prefix is stripped by
65
+ * these macro definitions.
66
+ */
67
+ #ifndef JEMALLOC_NO_RENAME
68
+ # define je_aligned_alloc selva_aligned_alloc
69
+ # define je_calloc selva_calloc
70
+ # define je_dallocx selva_dallocx
71
+ # define je_free selva_free
72
+ # define je_mallctl selva_mallctl
73
+ # define je_mallctlbymib selva_mallctlbymib
74
+ # define je_mallctlnametomib selva_mallctlnametomib
75
+ # define je_malloc selva_malloc
76
+ # define je_malloc_conf selva_malloc_conf
77
+ # define je_malloc_conf_2_conf_harder selva_malloc_conf_2_conf_harder
78
+ # define je_malloc_message selva_malloc_message
79
+ # define je_malloc_stats_print selva_malloc_stats_print
80
+ # define je_malloc_usable_size selva_malloc_usable_size
81
+ # define je_mallocx selva_mallocx
82
+ # define je_smallocx_54eaed1d8b56b1aa528be3bdd1877e59c56fa90c selva_smallocx_54eaed1d8b56b1aa528be3bdd1877e59c56fa90c
83
+ # define je_nallocx selva_nallocx
84
+ # define je_posix_memalign selva_posix_memalign
85
+ # define je_rallocx selva_rallocx
86
+ # define je_realloc selva_realloc
87
+ # define je_sallocx selva_sallocx
88
+ # define je_sdallocx selva_sdallocx
89
+ # define je_xallocx selva_xallocx
90
+ # define je_valloc selva_valloc
91
+ # define je_malloc_size selva_malloc_size
92
+ #endif
93
+
94
+ #include <stdlib.h>
95
+ #include <stdbool.h>
96
+ #include <stdint.h>
97
+ #include <limits.h>
98
+ #include <strings.h>
99
+
100
+ #define JEMALLOC_VERSION "5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c"
101
+ #define JEMALLOC_VERSION_MAJOR 5
102
+ #define JEMALLOC_VERSION_MINOR 3
103
+ #define JEMALLOC_VERSION_BUGFIX 0
104
+ #define JEMALLOC_VERSION_NREV 0
105
+ #define JEMALLOC_VERSION_GID "54eaed1d8b56b1aa528be3bdd1877e59c56fa90c"
106
+ #define JEMALLOC_VERSION_GID_IDENT 54eaed1d8b56b1aa528be3bdd1877e59c56fa90c
107
+
108
+ #define MALLOCX_LG_ALIGN(la) ((int)(la))
109
+ #if LG_SIZEOF_PTR == 2
110
+ # define MALLOCX_ALIGN(a) ((int)(ffs((int)(a))-1))
111
+ #else
112
+ # define MALLOCX_ALIGN(a) \
113
+ ((int)(((size_t)(a) < (size_t)INT_MAX) ? ffs((int)(a))-1 : \
114
+ ffs((int)(((size_t)(a))>>32))+31))
115
+ #endif
116
+ #define MALLOCX_ZERO ((int)0x40)
117
+ /*
118
+ * Bias tcache index bits so that 0 encodes "automatic tcache management", and 1
119
+ * encodes MALLOCX_TCACHE_NONE.
120
+ */
121
+ #define MALLOCX_TCACHE(tc) ((int)(((tc)+2) << 8))
122
+ #define MALLOCX_TCACHE_NONE MALLOCX_TCACHE(-1)
123
+ /*
124
+ * Bias arena index bits so that 0 encodes "use an automatically chosen arena".
125
+ */
126
+ #define MALLOCX_ARENA(a) ((((int)(a))+1) << 20)
127
+
128
+ /*
129
+ * Use as arena index in "arena.<i>.{purge,decay,dss}" and
130
+ * "stats.arenas.<i>.*" mallctl interfaces to select all arenas. This
131
+ * definition is intentionally specified in raw decimal format to support
132
+ * cpp-based string concatenation, e.g.
133
+ *
134
+ * #define STRINGIFY_HELPER(x) #x
135
+ * #define STRINGIFY(x) STRINGIFY_HELPER(x)
136
+ *
137
+ * mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".purge", NULL, NULL, NULL,
138
+ * 0);
139
+ */
140
+ #define MALLCTL_ARENAS_ALL 4096
141
+ /*
142
+ * Use as arena index in "stats.arenas.<i>.*" mallctl interfaces to select
143
+ * destroyed arenas.
144
+ */
145
+ #define MALLCTL_ARENAS_DESTROYED 4097
146
+
147
+ #if defined(__cplusplus) && defined(JEMALLOC_USE_CXX_THROW)
148
+ # define JEMALLOC_CXX_THROW throw()
149
+ #else
150
+ # define JEMALLOC_CXX_THROW
151
+ #endif
152
+
153
+ #if defined(_MSC_VER)
154
+ # define JEMALLOC_ATTR(s)
155
+ # define JEMALLOC_ALIGNED(s) __declspec(align(s))
156
+ # define JEMALLOC_ALLOC_SIZE(s)
157
+ # define JEMALLOC_ALLOC_SIZE2(s1, s2)
158
+ # ifndef JEMALLOC_EXPORT
159
+ # ifdef DLLEXPORT
160
+ # define JEMALLOC_EXPORT __declspec(dllexport)
161
+ # else
162
+ # define JEMALLOC_EXPORT __declspec(dllimport)
163
+ # endif
164
+ # endif
165
+ # define JEMALLOC_FORMAT_ARG(i)
166
+ # define JEMALLOC_FORMAT_PRINTF(s, i)
167
+ # define JEMALLOC_FALLTHROUGH
168
+ # define JEMALLOC_NOINLINE __declspec(noinline)
169
+ # ifdef __cplusplus
170
+ # define JEMALLOC_NOTHROW __declspec(nothrow)
171
+ # else
172
+ # define JEMALLOC_NOTHROW
173
+ # endif
174
+ # define JEMALLOC_SECTION(s) __declspec(allocate(s))
175
+ # define JEMALLOC_RESTRICT_RETURN __declspec(restrict)
176
+ # if _MSC_VER >= 1900 && !defined(__EDG__)
177
+ # define JEMALLOC_ALLOCATOR __declspec(allocator)
178
+ # else
179
+ # define JEMALLOC_ALLOCATOR
180
+ # endif
181
+ # define JEMALLOC_COLD
182
+ #elif defined(JEMALLOC_HAVE_ATTR)
183
+ # define JEMALLOC_ATTR(s) __attribute__((s))
184
+ # define JEMALLOC_ALIGNED(s) JEMALLOC_ATTR(aligned(s))
185
+ # ifdef JEMALLOC_HAVE_ATTR_ALLOC_SIZE
186
+ # define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s))
187
+ # define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2))
188
+ # else
189
+ # define JEMALLOC_ALLOC_SIZE(s)
190
+ # define JEMALLOC_ALLOC_SIZE2(s1, s2)
191
+ # endif
192
+ # ifndef JEMALLOC_EXPORT
193
+ # define JEMALLOC_EXPORT JEMALLOC_ATTR(visibility("default"))
194
+ # endif
195
+ # ifdef JEMALLOC_HAVE_ATTR_FORMAT_ARG
196
+ # define JEMALLOC_FORMAT_ARG(i) JEMALLOC_ATTR(__format_arg__(3))
197
+ # else
198
+ # define JEMALLOC_FORMAT_ARG(i)
199
+ # endif
200
+ # ifdef JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF
201
+ # define JEMALLOC_FORMAT_PRINTF(s, i) JEMALLOC_ATTR(format(gnu_printf, s, i))
202
+ # elif defined(JEMALLOC_HAVE_ATTR_FORMAT_PRINTF)
203
+ # define JEMALLOC_FORMAT_PRINTF(s, i) JEMALLOC_ATTR(format(printf, s, i))
204
+ # else
205
+ # define JEMALLOC_FORMAT_PRINTF(s, i)
206
+ # endif
207
+ # ifdef JEMALLOC_HAVE_ATTR_FALLTHROUGH
208
+ # define JEMALLOC_FALLTHROUGH JEMALLOC_ATTR(fallthrough)
209
+ # else
210
+ # define JEMALLOC_FALLTHROUGH
211
+ # endif
212
+ # define JEMALLOC_NOINLINE JEMALLOC_ATTR(noinline)
213
+ # define JEMALLOC_NOTHROW JEMALLOC_ATTR(nothrow)
214
+ # define JEMALLOC_SECTION(s) JEMALLOC_ATTR(section(s))
215
+ # define JEMALLOC_RESTRICT_RETURN
216
+ # define JEMALLOC_ALLOCATOR
217
+ # ifdef JEMALLOC_HAVE_ATTR_COLD
218
+ # define JEMALLOC_COLD JEMALLOC_ATTR(__cold__)
219
+ # else
220
+ # define JEMALLOC_COLD
221
+ # endif
222
+ #else
223
+ # define JEMALLOC_ATTR(s)
224
+ # define JEMALLOC_ALIGNED(s)
225
+ # define JEMALLOC_ALLOC_SIZE(s)
226
+ # define JEMALLOC_ALLOC_SIZE2(s1, s2)
227
+ # define JEMALLOC_EXPORT
228
+ # define JEMALLOC_FORMAT_PRINTF(s, i)
229
+ # define JEMALLOC_FALLTHROUGH
230
+ # define JEMALLOC_NOINLINE
231
+ # define JEMALLOC_NOTHROW
232
+ # define JEMALLOC_SECTION(s)
233
+ # define JEMALLOC_RESTRICT_RETURN
234
+ # define JEMALLOC_ALLOCATOR
235
+ # define JEMALLOC_COLD
236
+ #endif
237
+
238
+ #if (defined(__APPLE__) || defined(__FreeBSD__)) && !defined(JEMALLOC_NO_RENAME)
239
+ # define JEMALLOC_SYS_NOTHROW
240
+ #else
241
+ # define JEMALLOC_SYS_NOTHROW JEMALLOC_NOTHROW
242
+ #endif
243
+
244
+ /*
245
+ * The je_ prefix on the following public symbol declarations is an artifact
246
+ * of namespace management, and should be omitted in application code unless
247
+ * JEMALLOC_NO_DEMANGLE is defined (see jemalloc_mangle_selva.h).
248
+ */
249
+ extern JEMALLOC_EXPORT const char *je_malloc_conf;
250
+ extern JEMALLOC_EXPORT void (*je_malloc_message)(void *cbopaque,
251
+ const char *s);
252
+
253
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
254
+ void JEMALLOC_SYS_NOTHROW *je_malloc(size_t size)
255
+ JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc) JEMALLOC_ALLOC_SIZE(1);
256
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
257
+ void JEMALLOC_SYS_NOTHROW *je_calloc(size_t num, size_t size)
258
+ JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc) JEMALLOC_ALLOC_SIZE2(1, 2);
259
+ JEMALLOC_EXPORT int JEMALLOC_SYS_NOTHROW je_posix_memalign(
260
+ void **memptr, size_t alignment, size_t size) JEMALLOC_CXX_THROW
261
+ JEMALLOC_ATTR(nonnull(1));
262
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
263
+ void JEMALLOC_SYS_NOTHROW *je_aligned_alloc(size_t alignment,
264
+ size_t size) JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc)
265
+ JEMALLOC_ALLOC_SIZE(2);
266
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
267
+ void JEMALLOC_SYS_NOTHROW *je_realloc(void *ptr, size_t size)
268
+ JEMALLOC_CXX_THROW JEMALLOC_ALLOC_SIZE(2);
269
+ JEMALLOC_EXPORT void JEMALLOC_SYS_NOTHROW je_free(void *ptr)
270
+ JEMALLOC_CXX_THROW;
271
+
272
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
273
+ void JEMALLOC_NOTHROW *je_mallocx(size_t size, int flags)
274
+ JEMALLOC_ATTR(malloc) JEMALLOC_ALLOC_SIZE(1);
275
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
276
+ void JEMALLOC_NOTHROW *je_rallocx(void *ptr, size_t size,
277
+ int flags) JEMALLOC_ALLOC_SIZE(2);
278
+ JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_xallocx(void *ptr, size_t size,
279
+ size_t extra, int flags);
280
+ JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_sallocx(const void *ptr,
281
+ int flags) JEMALLOC_ATTR(pure);
282
+ JEMALLOC_EXPORT void JEMALLOC_NOTHROW je_dallocx(void *ptr, int flags);
283
+ JEMALLOC_EXPORT void JEMALLOC_NOTHROW je_sdallocx(void *ptr, size_t size,
284
+ int flags);
285
+ JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_nallocx(size_t size, int flags)
286
+ JEMALLOC_ATTR(pure);
287
+
288
+ JEMALLOC_EXPORT int JEMALLOC_NOTHROW je_mallctl(const char *name,
289
+ void *oldp, size_t *oldlenp, void *newp, size_t newlen);
290
+ JEMALLOC_EXPORT int JEMALLOC_NOTHROW je_mallctlnametomib(const char *name,
291
+ size_t *mibp, size_t *miblenp);
292
+ JEMALLOC_EXPORT int JEMALLOC_NOTHROW je_mallctlbymib(const size_t *mib,
293
+ size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
294
+ JEMALLOC_EXPORT void JEMALLOC_NOTHROW je_malloc_stats_print(
295
+ void (*write_cb)(void *, const char *), void *je_cbopaque,
296
+ const char *opts);
297
+ JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_malloc_usable_size(
298
+ JEMALLOC_USABLE_SIZE_CONST void *ptr) JEMALLOC_CXX_THROW;
299
+ #ifdef JEMALLOC_HAVE_MALLOC_SIZE
300
+ JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_malloc_size(
301
+ const void *ptr);
302
+ #endif
303
+
304
+ #ifdef JEMALLOC_OVERRIDE_MEMALIGN
305
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
306
+ void JEMALLOC_SYS_NOTHROW *je_memalign(size_t alignment, size_t size)
307
+ JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc);
308
+ #endif
309
+
310
+ #ifdef JEMALLOC_OVERRIDE_VALLOC
311
+ JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN
312
+ void JEMALLOC_SYS_NOTHROW *je_valloc(size_t size) JEMALLOC_CXX_THROW
313
+ JEMALLOC_ATTR(malloc);
314
+ #endif
315
+
316
+ typedef struct extent_hooks_s extent_hooks_t;
317
+
318
+ /*
319
+ * void *
320
+ * extent_alloc(extent_hooks_t *extent_hooks, void *new_addr, size_t size,
321
+ * size_t alignment, bool *zero, bool *commit, unsigned arena_ind);
322
+ */
323
+ typedef void *(extent_alloc_t)(extent_hooks_t *, void *, size_t, size_t, bool *,
324
+ bool *, unsigned);
325
+
326
+ /*
327
+ * bool
328
+ * extent_dalloc(extent_hooks_t *extent_hooks, void *addr, size_t size,
329
+ * bool committed, unsigned arena_ind);
330
+ */
331
+ typedef bool (extent_dalloc_t)(extent_hooks_t *, void *, size_t, bool,
332
+ unsigned);
333
+
334
+ /*
335
+ * void
336
+ * extent_destroy(extent_hooks_t *extent_hooks, void *addr, size_t size,
337
+ * bool committed, unsigned arena_ind);
338
+ */
339
+ typedef void (extent_destroy_t)(extent_hooks_t *, void *, size_t, bool,
340
+ unsigned);
341
+
342
+ /*
343
+ * bool
344
+ * extent_commit(extent_hooks_t *extent_hooks, void *addr, size_t size,
345
+ * size_t offset, size_t length, unsigned arena_ind);
346
+ */
347
+ typedef bool (extent_commit_t)(extent_hooks_t *, void *, size_t, size_t, size_t,
348
+ unsigned);
349
+
350
+ /*
351
+ * bool
352
+ * extent_decommit(extent_hooks_t *extent_hooks, void *addr, size_t size,
353
+ * size_t offset, size_t length, unsigned arena_ind);
354
+ */
355
+ typedef bool (extent_decommit_t)(extent_hooks_t *, void *, size_t, size_t,
356
+ size_t, unsigned);
357
+
358
+ /*
359
+ * bool
360
+ * extent_purge(extent_hooks_t *extent_hooks, void *addr, size_t size,
361
+ * size_t offset, size_t length, unsigned arena_ind);
362
+ */
363
+ typedef bool (extent_purge_t)(extent_hooks_t *, void *, size_t, size_t, size_t,
364
+ unsigned);
365
+
366
+ /*
367
+ * bool
368
+ * extent_split(extent_hooks_t *extent_hooks, void *addr, size_t size,
369
+ * size_t size_a, size_t size_b, bool committed, unsigned arena_ind);
370
+ */
371
+ typedef bool (extent_split_t)(extent_hooks_t *, void *, size_t, size_t, size_t,
372
+ bool, unsigned);
373
+
374
+ /*
375
+ * bool
376
+ * extent_merge(extent_hooks_t *extent_hooks, void *addr_a, size_t size_a,
377
+ * void *addr_b, size_t size_b, bool committed, unsigned arena_ind);
378
+ */
379
+ typedef bool (extent_merge_t)(extent_hooks_t *, void *, size_t, void *, size_t,
380
+ bool, unsigned);
381
+
382
+ struct extent_hooks_s {
383
+ extent_alloc_t *alloc;
384
+ extent_dalloc_t *dalloc;
385
+ extent_destroy_t *destroy;
386
+ extent_commit_t *commit;
387
+ extent_decommit_t *decommit;
388
+ extent_purge_t *purge_lazy;
389
+ extent_purge_t *purge_forced;
390
+ extent_split_t *split;
391
+ extent_merge_t *merge;
392
+ };
393
+
394
+ /*
395
+ * By default application code must explicitly refer to mangled symbol names,
396
+ * so that it is possible to use jemalloc in conjunction with another allocator
397
+ * in the same application. Define JEMALLOC_MANGLE in order to cause automatic
398
+ * name mangling that matches the API prefixing that happened as a result of
399
+ * --with-mangling and/or --with-jemalloc-prefix configuration settings.
400
+ */
401
+ #ifdef JEMALLOC_MANGLE
402
+ # ifndef JEMALLOC_NO_DEMANGLE
403
+ # define JEMALLOC_NO_DEMANGLE
404
+ # endif
405
+ # define aligned_alloc je_aligned_alloc
406
+ # define calloc je_calloc
407
+ # define dallocx je_dallocx
408
+ # define free je_free
409
+ # define mallctl je_mallctl
410
+ # define mallctlbymib je_mallctlbymib
411
+ # define mallctlnametomib je_mallctlnametomib
412
+ # define malloc je_malloc
413
+ # define malloc_conf je_malloc_conf
414
+ # define malloc_conf_2_conf_harder je_malloc_conf_2_conf_harder
415
+ # define malloc_message je_malloc_message
416
+ # define malloc_stats_print je_malloc_stats_print
417
+ # define malloc_usable_size je_malloc_usable_size
418
+ # define mallocx je_mallocx
419
+ # define smallocx_54eaed1d8b56b1aa528be3bdd1877e59c56fa90c je_smallocx_54eaed1d8b56b1aa528be3bdd1877e59c56fa90c
420
+ # define nallocx je_nallocx
421
+ # define posix_memalign je_posix_memalign
422
+ # define rallocx je_rallocx
423
+ # define realloc je_realloc
424
+ # define sallocx je_sallocx
425
+ # define sdallocx je_sdallocx
426
+ # define xallocx je_xallocx
427
+ # define valloc je_valloc
428
+ # define malloc_size je_malloc_size
429
+ #endif
430
+
431
+ /*
432
+ * The je_* macros can be used as stable alternative names for the
433
+ * public jemalloc API if JEMALLOC_NO_DEMANGLE is defined. This is primarily
434
+ * meant for use in jemalloc itself, but it can be used by application code to
435
+ * provide isolation from the name mangling specified via --with-mangling
436
+ * and/or --with-jemalloc-prefix.
437
+ */
438
+ #ifndef JEMALLOC_NO_DEMANGLE
439
+ # undef je_aligned_alloc
440
+ # undef je_calloc
441
+ # undef je_dallocx
442
+ # undef je_free
443
+ # undef je_mallctl
444
+ # undef je_mallctlbymib
445
+ # undef je_mallctlnametomib
446
+ # undef je_malloc
447
+ # undef je_malloc_conf
448
+ # undef je_malloc_conf_2_conf_harder
449
+ # undef je_malloc_message
450
+ # undef je_malloc_stats_print
451
+ # undef je_malloc_usable_size
452
+ # undef je_mallocx
453
+ # undef je_smallocx_54eaed1d8b56b1aa528be3bdd1877e59c56fa90c
454
+ # undef je_nallocx
455
+ # undef je_posix_memalign
456
+ # undef je_rallocx
457
+ # undef je_realloc
458
+ # undef je_sallocx
459
+ # undef je_sdallocx
460
+ # undef je_xallocx
461
+ # undef je_valloc
462
+ # undef je_malloc_size
463
+ #endif
464
+
465
+ #ifdef __cplusplus
466
+ }
467
+ #endif
468
+ #endif /* JEMALLOC_H_ */