Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions verifiers/v1/utils/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ async def trim_memory_periodically() -> None:
trim runs in a worker thread — `ctypes` releases the GIL during the call, so the heap walk
doesn't block the event loop (and every other in-flight rollout with it)."""
global _rollouts_since_trim
if _malloc_trim is False:
return
_rollouts_since_trim += 1
if _rollouts_since_trim >= _TRIM_EVERY_ROLLOUTS:
_rollouts_since_trim = 0
Expand Down
Loading