SC: Remove global data.
The global data is mostly only used at initialization, or for easy access to values we could compute statically. Instead of consuming that space (and risking TLB misses), we can just pass around a pointer to stack data during bootstrapping.
This commit is contained in:
committed by
David Goldblatt
parent
4bc48718b2
commit
3aba072cef
@@ -2,7 +2,7 @@
|
||||
#include "jemalloc/internal/sz.h"
|
||||
|
||||
JEMALLOC_ALIGNED(CACHELINE)
|
||||
size_t sz_pind2sz_tab[SC_NPSIZES_MAX+1];
|
||||
size_t sz_pind2sz_tab[SC_NPSIZES+1];
|
||||
|
||||
static void
|
||||
sz_boot_pind2sz_tab(const sc_data_t *sc_data) {
|
||||
@@ -15,7 +15,9 @@ sz_boot_pind2sz_tab(const sc_data_t *sc_data) {
|
||||
pind++;
|
||||
}
|
||||
}
|
||||
sz_pind2sz_tab[pind] = sc_data->large_maxclass + PAGE;
|
||||
for (int i = pind; i <= (int)SC_NPSIZES; i++) {
|
||||
sz_pind2sz_tab[pind] = sc_data->large_maxclass + PAGE;
|
||||
}
|
||||
}
|
||||
|
||||
JEMALLOC_ALIGNED(CACHELINE)
|
||||
|
||||
Reference in New Issue
Block a user