mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23: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
@@ -25,7 +25,7 @@ enum prof_logging_state_e {
|
||||
* - started: log_start called, log_stop not called yet. Allocations are logged.
|
||||
* - dumping: log_stop called but not finished; samples are not logged anymore.
|
||||
*/
|
||||
prof_logging_state_t prof_logging_state = prof_logging_state_stopped;
|
||||
static prof_logging_state_t prof_logging_state = prof_logging_state_stopped;
|
||||
|
||||
/* Used in unit tests. */
|
||||
static bool prof_log_dummy = false;
|
||||
|
||||
Reference in New Issue
Block a user