Merge branch 'shaped-run-4k-slabs' of https://github.com/j-c-m/kitty
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run

This commit is contained in:
Kovid Goyal 2026-09-10 22:32:02 +05:30
commit 69bf7e2fc5
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -14,6 +14,7 @@
#define SHAPED_RUN_MAX_ENTRIES 2048u
#define SHAPED_RUN_MAX_BYTES (1024u * 1024u)
#define SHAPED_RUN_MA_BLOCK_SIZE 16u
#define SHAPED_RUN_SLAB 4096u
typedef struct ShapedRunKey {
uint32_t keysz_in_bytes;
@ -56,11 +57,12 @@ static bool shaped_run_map_cmpr(KEY_TY a, KEY_TY b);
#define MA_NAME Key
#define MA_BLOCK_SIZE SHAPED_RUN_MA_BLOCK_SIZE
static_assert(MA_BLOCK_SIZE > sizeof(ShapedRunKey), "increase arena block size");
#define MA_ARENA_NUM_BLOCKS (2048u / MA_BLOCK_SIZE)
static_assert(SHAPED_RUN_SLAB % MA_BLOCK_SIZE == 0, "slab must be a multiple of the block size");
#define MA_ARENA_NUM_BLOCKS (SHAPED_RUN_SLAB / MA_BLOCK_SIZE)
#include "arena.h"
#define MA_NAME Val
#define MA_BLOCK_SIZE SHAPED_RUN_MA_BLOCK_SIZE
#define MA_ARENA_NUM_BLOCKS (2048u / MA_BLOCK_SIZE)
#define MA_ARENA_NUM_BLOCKS (SHAPED_RUN_SLAB / MA_BLOCK_SIZE)
#include "arena.h"
#include "kitty-verstable.h"