File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 37
37
#define __xstr (s ) __str(s)
38
38
#define __str (s ) #s
39
39
40
- #ifdef HAVE_MALLOC_SIZE
41
- #define PREFIX_SIZE 0
42
- #else
43
- /* Use at least 8 bytes alignment on all systems. */
44
- #if SIZE_MAX < 0xffffffffffffffffull
45
- #define PREFIX_SIZE 8
46
- #else
47
- #define PREFIX_SIZE (sizeof(size_t))
48
- #endif
49
- #endif
50
-
51
40
#if defined(USE_TCMALLOC )
52
41
#define ZMALLOC_LIB ("tcmalloc-" __xstr(TC_VERSION_MAJOR) "." __xstr(TC_VERSION_MINOR))
53
42
#include <gperftools/tcmalloc.h>
@@ -179,6 +168,17 @@ size_t zmalloc_usable_size(void *ptr);
179
168
* obtained from z[*]_usable() family functions, there is no need for this step. */
180
169
#define zmalloc_usable_size (p ) zmalloc_size(p)
181
170
171
+ #ifdef HAVE_MALLOC_SIZE
172
+ #define PREFIX_SIZE 0
173
+ #else
174
+ /* Use at least 8 bytes alignment on all systems. */
175
+ #if SIZE_MAX < 0xffffffffffffffffull
176
+ #define PREFIX_SIZE 8
177
+ #else
178
+ #define PREFIX_SIZE (sizeof(size_t))
179
+ #endif
180
+ #endif
181
+
182
182
/* derived from https://github.com/systemd/systemd/pull/25688
183
183
* We use zmalloc_usable_size() everywhere to use memory blocks, but that is an abuse since the
184
184
* malloc_usable_size() isn't meant for this kind of use, it is for diagnostics only. That is also why the
You can’t perform that action at this time.
0 commit comments