mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 08:13:37 +08:00
wip: collect at all per-job thread exits
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
@@ -1602,6 +1602,10 @@ static void *application_job_thread(void *opaque) {
|
||||
}
|
||||
}
|
||||
application_job_publish(job, &execution);
|
||||
/* Same reasoning as the connection worker: hand this thread's allocator
|
||||
* pages back while it still owns them, since abandoned pages are not
|
||||
* reclaimed in practice (#581). */
|
||||
cbm_mem_collect();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1248,6 +1248,10 @@ static void *runtime_application_worker(void *opaque) {
|
||||
if (!sent && !atomic_load_explicit(&worker->disconnecting, memory_order_acquire)) {
|
||||
cbm_daemon_ipc_connection_interrupt(worker->connection);
|
||||
}
|
||||
/* Same reasoning as the connection worker: hand this thread's allocator
|
||||
* pages back while it still owns them, since abandoned pages are not
|
||||
* reclaimed in practice (#581). */
|
||||
cbm_mem_collect();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user