Do not create size class tables for non-prof builds
This commit is contained in:
@@ -10,8 +10,8 @@ extern malloc_mutex_t prof_dump_mtx;
|
||||
extern malloc_mutex_t *gctx_locks;
|
||||
extern malloc_mutex_t *tdata_locks;
|
||||
|
||||
extern size_t prof_unbiased_sz[SC_NSIZES];
|
||||
extern size_t prof_shifted_unbiased_cnt[SC_NSIZES];
|
||||
extern size_t prof_unbiased_sz[PROF_SC_NSIZES];
|
||||
extern size_t prof_shifted_unbiased_cnt[PROF_SC_NSIZES];
|
||||
|
||||
void prof_bt_hash(const void *key, size_t r_hash[2]);
|
||||
bool prof_bt_keycomp(const void *k1, const void *k2);
|
||||
|
@@ -39,6 +39,14 @@ typedef struct prof_recent_s prof_recent_t;
|
||||
# define PROF_DUMP_BUFSIZE 65536
|
||||
#endif
|
||||
|
||||
/* Size of size class related tables */
|
||||
#ifdef JEMALLOC_PROF
|
||||
# define PROF_SC_NSIZES SC_NSIZES
|
||||
#else
|
||||
/* Minimize memory bloat for non-prof builds. */
|
||||
# define PROF_SC_NSIZES 1
|
||||
#endif
|
||||
|
||||
/* Size of stack-allocated buffer used by prof_printf(). */
|
||||
#define PROF_PRINTF_BUFSIZE 128
|
||||
|
||||
|
Reference in New Issue
Block a user