mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 13:22:07 +00:00
Reduce memory usage of HTTP server (#6135)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
12
src/bun.js/bindings/JSCUSocketsLoopIntegration.cpp
Normal file
12
src/bun.js/bindings/JSCUSocketsLoopIntegration.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "root.h"
|
||||
#include "JavaScriptCore/VM.h"
|
||||
|
||||
extern "C" void bun_on_tick_before(JSC::VM* vm)
|
||||
{
|
||||
// Let the GC do some work while we are idle
|
||||
vm->heap.releaseAccess();
|
||||
}
|
||||
extern "C" void bun_on_tick_after(JSC::VM* vm)
|
||||
{
|
||||
vm->heap.acquireAccess();
|
||||
}
|
||||
Reference in New Issue
Block a user