mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-09 09:11:00 +08:00
SQLITE_CONFIG_PAGECACHE is only accepted before sqlite3_initialize, so calling it from the store open paths was always refused (rc=misuse) and every request-scoped store fell back to allocating its page cache from the general allocator. Each request therefore took a fresh multi-megabyte run of arena slices and left the previous one fragmented behind mimalloc's commit frontier, which is the per-request retention behind #581. Hoisted to process init, immediately after the allocator binding and before anything can open a store. The existing call sites stay as an idempotent backstop. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>