diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2026-09-24 10:05:24 +0200 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2026-09-24 10:05:24 +0200 |
| commit | 72d997ac2f4629281fc5299305fd370b69f2eeb3 (patch) | |
| tree | fda9aebc4e4d9ac14ebf02ac583af28509235f7e | |
| parent | 8dc7dd25514d5cb082c0b77c8eaafe09f5f57358 (diff) | |
Meta Alloc tweaks.
| -rw-r--r-- | MetaAlloc.ods | bin | 35279 -> 35370 bytes | |||
| -rw-r--r-- | src/zisp/gc/meta_alloc.zig | 8 |
2 files changed, 4 insertions, 4 deletions
diff --git a/MetaAlloc.ods b/MetaAlloc.ods Binary files differindex 1313aab..8d0eb95 100644 --- a/MetaAlloc.ods +++ b/MetaAlloc.ods diff --git a/src/zisp/gc/meta_alloc.zig b/src/zisp/gc/meta_alloc.zig index 248b00b..726dda4 100644 --- a/src/zisp/gc/meta_alloc.zig +++ b/src/zisp/gc/meta_alloc.zig @@ -41,7 +41,7 @@ // next_head_idx: u32, // extra_idx_count: u32, // pad_to_64_bytes: [14]u32, -// extra_idx_array: [16]u32, +// extra_idx_array: [32]u32, // } // // So, it's not a typical free-list where each node simply points to the next @@ -106,7 +106,7 @@ const SlotPtr = [*]Unit; const SIZES: [16]usize = .{ // Important: Ensure the smallest size class is inherently immune to false // sharing, and no smaller than: 64 + @sizeOf(UnitIdx) * ( FSC_MAX / 2 ). - // That's exactly 128 bytes assuming FSC_MAX = 32 (see below). + // That's 192 bytes assuming FSC_MAX = 64 (see below). 256, 512, 1024, @@ -164,11 +164,11 @@ var slab_infos: [SIZES.len]SlabInfo = @splat(.{}); /// Maximum number of slots reserved by a thread when bumping a slab watermark. /// Halved after every two size classes, so make sure it's >= 128. -const RESERVE_MAX: UnitIdx = 512; // Results in 4 for the two largest classes. +const RESERVE_MAX: UnitIdx = 1024; // Results in 8 for the two largest classes. /// Maximum number of free slot cache entries before half of them are flushed. /// Halved after every four size classes, so make sure it's >= 8. -const FSC_MAX: UnitIdx = 32; // Results in 4 for the two largest classes. +const FSC_MAX: UnitIdx = 64; // Results in 8 for the two largest classes. /// Given a size class index 0 to 15, returns the number of slots that a thread /// should reserve every time it needs to bump the global watermark. Starts at |
