mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-16 01:46:23 +03:00
Remove build-time configuration 'config_limit_usize_gap'
This commit is contained in:
parent
852da1be15
commit
01e9ecbeb2
15 changed files with 160 additions and 244 deletions
|
|
@ -123,12 +123,7 @@ zero_realloc_action_t opt_zero_realloc_action =
|
|||
|
||||
atomic_zu_t zero_realloc_count = ATOMIC_INIT(0);
|
||||
|
||||
bool opt_limit_usize_gap =
|
||||
#ifdef LIMIT_USIZE_GAP
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
bool opt_limit_usize_gap = true;
|
||||
|
||||
const char *const zero_realloc_mode_names[] = {
|
||||
"alloc",
|
||||
|
|
@ -1785,10 +1780,8 @@ malloc_conf_init_helper(sc_data_t *sc_data, unsigned bin_shard_sizes[SC_NBINS],
|
|||
"san_guard_large", 0, SIZE_T_MAX,
|
||||
CONF_DONT_CHECK_MIN, CONF_DONT_CHECK_MAX, false)
|
||||
|
||||
if (config_limit_usize_gap) {
|
||||
CONF_HANDLE_BOOL(opt_limit_usize_gap,
|
||||
"limit_usize_gap");
|
||||
}
|
||||
CONF_HANDLE_BOOL(opt_limit_usize_gap,
|
||||
"limit_usize_gap");
|
||||
|
||||
CONF_ERROR("Invalid conf pair", k, klen, v, vlen);
|
||||
#undef CONF_ERROR
|
||||
|
|
@ -2209,17 +2202,16 @@ static bool
|
|||
malloc_init_hard(void) {
|
||||
tsd_t *tsd;
|
||||
|
||||
if (config_limit_usize_gap) {
|
||||
assert(TCACHE_MAXCLASS_LIMIT <= USIZE_GROW_SLOW_THRESHOLD);
|
||||
assert(SC_LOOKUP_MAXCLASS <= USIZE_GROW_SLOW_THRESHOLD);
|
||||
/*
|
||||
* This asserts an extreme case where TINY_MAXCLASS is larger
|
||||
* than LARGE_MINCLASS. It could only happen if some constants
|
||||
* are configured miserably wrong.
|
||||
*/
|
||||
assert(SC_LG_TINY_MAXCLASS <=
|
||||
(size_t)1ULL << (LG_PAGE + SC_LG_NGROUP));
|
||||
}
|
||||
assert(TCACHE_MAXCLASS_LIMIT <= USIZE_GROW_SLOW_THRESHOLD);
|
||||
assert(SC_LOOKUP_MAXCLASS <= USIZE_GROW_SLOW_THRESHOLD);
|
||||
/*
|
||||
* This asserts an extreme case where TINY_MAXCLASS is larger
|
||||
* than LARGE_MINCLASS. It could only happen if some constants
|
||||
* are configured miserably wrong.
|
||||
*/
|
||||
assert(SC_LG_TINY_MAXCLASS <=
|
||||
(size_t)1ULL << (LG_PAGE + SC_LG_NGROUP));
|
||||
|
||||
#if defined(_WIN32) && _WIN32_WINNT < 0x0600
|
||||
_init_init_lock();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue