mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-05 18:06:14 +03:00
Hide size class computation behind a layer of indirection.
This class removes almost all the dependencies on size_classes.h, accessing the data there only via the new module sc.h, which does not depend on any configuration options. In a subsequent commit, we'll remove the configure-time size class computations, doing them at boot time, instead.
This commit is contained in:
parent
fb924dd7bf
commit
e904f813b4
46 changed files with 886 additions and 459 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "jemalloc/internal/jemalloc_internal_types.h"
|
||||
#include "jemalloc/internal/mutex.h"
|
||||
#include "jemalloc/internal/size_classes.h"
|
||||
#include "jemalloc/internal/sc.h"
|
||||
|
||||
/* Embedded at the beginning of every block of base-managed virtual memory. */
|
||||
struct base_block_s {
|
||||
|
|
@ -46,7 +46,7 @@ struct base_s {
|
|||
base_block_t *blocks;
|
||||
|
||||
/* Heap of extents that track unused trailing space within blocks. */
|
||||
extent_heap_t avail[NSIZES];
|
||||
extent_heap_t avail[SC_NSIZES];
|
||||
|
||||
/* Stats, only maintained if config_stats. */
|
||||
size_t allocated;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue