mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 01:27:19 +03:00
Reformat the codebase with the clang-format 18.
This commit is contained in:
parent
a952a3b8b0
commit
6200e8987f
346 changed files with 18286 additions and 17770 deletions
14
src/sz.c
14
src/sz.c
|
|
@ -3,12 +3,12 @@
|
|||
#include "jemalloc/internal/sz.h"
|
||||
|
||||
JEMALLOC_ALIGNED(CACHELINE)
|
||||
size_t sz_pind2sz_tab[SC_NPSIZES+1];
|
||||
size_t sz_pind2sz_tab[SC_NPSIZES + 1];
|
||||
size_t sz_large_pad;
|
||||
|
||||
size_t
|
||||
sz_psz_quantize_floor(size_t size) {
|
||||
size_t ret;
|
||||
size_t ret;
|
||||
pszind_t pind;
|
||||
|
||||
assert(size > 0);
|
||||
|
|
@ -47,8 +47,8 @@ sz_psz_quantize_ceil(size_t size) {
|
|||
* search would potentially find sufficiently aligned available
|
||||
* memory somewhere lower.
|
||||
*/
|
||||
ret = sz_pind2sz(sz_psz2ind(ret - sz_large_pad + 1)) +
|
||||
sz_large_pad;
|
||||
ret = sz_pind2sz(sz_psz2ind(ret - sz_large_pad + 1))
|
||||
+ sz_large_pad;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -93,12 +93,12 @@ sz_boot_size2index_tab(const sc_data_t *sc_data) {
|
|||
size_t dst_max = (SC_LOOKUP_MAXCLASS >> SC_LG_TINY_MIN) + 1;
|
||||
size_t dst_ind = 0;
|
||||
for (unsigned sc_ind = 0; sc_ind < SC_NSIZES && dst_ind < dst_max;
|
||||
sc_ind++) {
|
||||
sc_ind++) {
|
||||
const sc_t *sc = &sc_data->sc[sc_ind];
|
||||
size_t sz = (ZU(1) << sc->lg_base)
|
||||
size_t sz = (ZU(1) << sc->lg_base)
|
||||
+ (ZU(sc->ndelta) << sc->lg_delta);
|
||||
size_t max_ind = ((sz + (ZU(1) << SC_LG_TINY_MIN) - 1)
|
||||
>> SC_LG_TINY_MIN);
|
||||
>> SC_LG_TINY_MIN);
|
||||
for (; dst_ind <= max_ind && dst_ind < dst_max; dst_ind++) {
|
||||
assert(sc_ind < 1 << (sizeof(uint8_t) * 8));
|
||||
sz_size2index_tab[dst_ind] = (uint8_t)sc_ind;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue