mirror of
https://github.com/jemalloc/jemalloc
synced 2026-06-08 15:01:07 +00:00
09d419ded5
Fold historical *_types/_structs/_externs/_inlines splits where the layering is no longer load-bearing. - large_externs.h -> large.h: rename; it was a single-purpose function-prototype file. - background_thread_structs.h + background_thread_externs.h -> background_thread.h: merge. background_thread_inlines.h stays separate because it depends on arena_inlines_a.h. - bin_types.h -> bin.h: BIN_SHARDS_MAX / N_BIN_SHARDS_DEFAULT join the bin_t struct and the bin_dalloc_locked_info_t type. bin_inlines.h stays separate so TUs that only need the bin_t type don't pull in the tcache-flush inline closure. The two bin_stats_* helpers move from bin.h into bin_inlines.h so all bin inlines live together. - tsd_binshards.h (new): houses tsd_binshards_t and its zero initializer. Lets tsd_internals.h pull it in for X-macro expansion without dragging mutex.h -- mutex.h depends on TSD machinery, which would form a cycle through bin.h. jemalloc_internal_includes.h drops the references to the deleted/ merged headers.
25 lines
841 B
C
25 lines
841 B
C
#ifndef JEMALLOC_INTERNAL_TSD_BINSHARDS_H
|
|
#define JEMALLOC_INTERNAL_TSD_BINSHARDS_H
|
|
|
|
#include "jemalloc/internal/jemalloc_preamble.h"
|
|
#include "jemalloc/internal/sc.h"
|
|
|
|
/*
|
|
* Per-thread cache of bin-shard assignments. This lives in its own header
|
|
* (separate from bin.h) so that tsd_internals.h can pull it in for X-macro
|
|
* expansion without dragging in mutex.h, which itself depends on TSD machinery
|
|
* and would form an include-order dependency cycle.
|
|
*/
|
|
|
|
#define TSD_BINSHARDS_ZERO_INITIALIZER \
|
|
{ \
|
|
{ UINT8_MAX } \
|
|
}
|
|
|
|
typedef struct tsd_binshards_s tsd_binshards_t;
|
|
struct tsd_binshards_s {
|
|
uint8_t binshard[SC_NBINS];
|
|
};
|
|
|
|
#endif /* JEMALLOC_INTERNAL_TSD_BINSHARDS_H */
|