deno
2709a59d - fix(core): remove buffer pool background zeroer thread, add Drop impl

Commit
23 days ago
fix(core): remove buffer pool background zeroer thread, add Drop impl The pooled ArrayBuffer allocator spawned a perpetual "deno-buffer-zeroer" background thread that was never joined, so the deno_core Miri job aborted at process exit ("the main thread terminated without waiting for all remaining threads"). BufferPool also had no Drop impl, so blocks retained on the freelists leaked once the pool was dropped. Collapse the two-tier (clean/dirty) design into a single freelist per size class and zero blocks inline on allocate. The block is still resident, so this is a memset rather than a page-fault-then-zero; the primary win (keeping freed backing stores resident instead of returning them to the system) is unaffected. This removes the library-spawned thread and the per-free condvar signaling entirely. Add a Drop impl that frees any blocks still retained on the freelists.
Author
Parents
Loading