mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 08:13:37 +08:00
wip: collect at store release now that pages are mimalloc's
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
@@ -10419,6 +10419,13 @@ static void release_request_store(cbm_mcp_server_t *srv) {
|
||||
srv->store = NULL;
|
||||
free(srv->current_project);
|
||||
srv->current_project = NULL;
|
||||
/* The close above frees a connection's worth of page cache. Ask the
|
||||
* allocator to hand those pages back now, which keeps a long-lived daemon
|
||||
* flat across thousands of request-scoped stores (#581). This only became
|
||||
* meaningful once the Windows interposer made the pages mimalloc's: an
|
||||
* earlier attempt aimed at the CRT heap instead and could not release
|
||||
* them. POSIX already purges on free, so this is a no-op there. */
|
||||
cbm_mem_collect();
|
||||
}
|
||||
|
||||
char *cbm_mcp_handle_tool(cbm_mcp_server_t *srv, const char *tool_name, const char *args_json) {
|
||||
|
||||
Reference in New Issue
Block a user