Skip to content

Commit

Permalink
Update tables
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi committed Jul 19, 2023
1 parent 01a0f4a commit 095850d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ STATIC_INLINE jl_gc_pagemeta_t *pop_lf_page_metadata_back(jl_gc_global_page_pool
}

#ifdef _P64
#define REGION0_PG_COUNT (1 << 16)
#define REGION0_PG_COUNT (1 << 14)
#define REGION1_PG_COUNT (1 << 16)
#define REGION2_PG_COUNT (1 << 18)
#define REGION0_INDEX(p) (((uintptr_t)(p) >> GC_PAGE_LG2) & 0xFFFF) // shift by GC_PAGE_LG2
#define REGION1_INDEX(p) (((uintptr_t)(p) >> 30) & 0xFFFF)
#define REGION_INDEX(p) (((uintptr_t)(p) >> 46) & 0x3FFFF)
#else
#define REGION0_PG_COUNT (1 << 8)
#define REGION0_PG_COUNT (1 << 6)
#define REGION1_PG_COUNT (1 << 10)
#define REGION2_PG_COUNT (1 << 0)
#define REGION0_INDEX(p) (((uintptr_t)(p) >> GC_PAGE_LG2) & 0xFF) // shift by GC_PAGE_LG2
Expand Down
14 changes: 6 additions & 8 deletions src/julia_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ void gc_sweep_sysimg(void);


// pools are 65528 bytes large (GC_POOL_SZ - GC_PAGE_OFFSET)
// TODO update table for 64k size
static const int jl_gc_sizeclasses[] = {
#ifdef _P64
8,
Expand All @@ -370,18 +369,17 @@ static const int jl_gc_sizeclasses[] = {

// rng = 60:-4:32 (8 pools)
272, 288, 304, 336, 368, 400, 448, 496,
// 60, 56, 53, 48, 44, 40, 36, 33, /pool
// 64, 256, 272, 256, 192, 384, 256, 16, bytes lost

// 240, 227, 215, 195, 178, 163, 146, 132, /pool
// 248, 152, 168, 8, 24, 328, 120, 56, bytes lost
// rng = 30:-2:16 (8 pools)
544, 576, 624, 672, 736, 816, 896, 1008,
// 30, 28, 26, 24, 22, 20, 18, 16, /pool
// 64, 256, 160, 256, 192, 64, 256, 256, bytes lost
// 120, 113, 105, 97, 89, 80, 73, 65, /pool
// 248, 440, 8, 344, 24, 248, 120, 8, bytes lost

// rng = 15:-1:8 (8 pools)
1088, 1168, 1248, 1360, 1488, 1632, 1808, 2032
// 15, 14, 13, 12, 11, 10, 9, 8, /pool
// 64, 32, 160, 64, 16, 64, 112, 128, bytes lost
// 60, 56, 52, 48, 44, 40, 36, 32, /pool
// 248, 120, 632, 248, 56, 248, 440, 504, bytes lost
};
static_assert(sizeof(jl_gc_sizeclasses) / sizeof(jl_gc_sizeclasses[0]) == JL_GC_N_POOLS, "");

Expand Down

0 comments on commit 095850d

Please sign in to comment.