mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 13:13:06 +00:00
Make eligible global variables static and/or const
For better or worse, Jemalloc has a significant number of global variables. Making all eligible global variables `static` and/or `const` at least makes it slightly easier to reason about them, as these qualifications communicate to the programmer restrictions on their use without having to `grep` the whole codebase.
This commit is contained in:
committed by
Qi Wang
parent
e249d1a2a1
commit
589c63b424
@@ -73,16 +73,16 @@ static malloc_mutex_t next_thr_uid_mtx;
|
||||
bool prof_booted = false;
|
||||
|
||||
/* Logically a prof_backtrace_hook_t. */
|
||||
atomic_p_t prof_backtrace_hook;
|
||||
static atomic_p_t prof_backtrace_hook;
|
||||
|
||||
/* Logically a prof_dump_hook_t. */
|
||||
atomic_p_t prof_dump_hook;
|
||||
static atomic_p_t prof_dump_hook;
|
||||
|
||||
/* Logically a prof_sample_hook_t. */
|
||||
atomic_p_t prof_sample_hook;
|
||||
static atomic_p_t prof_sample_hook;
|
||||
|
||||
/* Logically a prof_sample_free_hook_t. */
|
||||
atomic_p_t prof_sample_free_hook;
|
||||
static atomic_p_t prof_sample_free_hook;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user