docs(runtime): drop redundant allocator comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
InfinityPacer
2026-09-28 18:11:56 +08:00
committed by InfinityPacer
parent ecafd4ce14
commit 143ed49de0
3 changed files with 0 additions and 4 deletions

View File

@@ -204,7 +204,6 @@ def run_application() -> None:
)
signal.signal(signal.SIGTERM, signal_handler)
signal.signal(signal.SIGINT, signal_handler)
# 只在主进程开启分配器后台回收,浏览器等子进程不继承
from app.runtime.gc import configure_allocator_background_thread
configure_allocator_background_thread()

View File

@@ -89,7 +89,6 @@ def get_memory_usage() -> float:
_JEMALLOC_ARENAS_ALL_PURGE = b"arena.4096.purge"
# 把调用线程的线程缓存(tcache)交还所属 arena
_JEMALLOC_THREAD_TCACHE_FLUSH = b"thread.tcache.flush"
# 后台回收线程开关与数量上限,均可在运行时写入
_JEMALLOC_BACKGROUND_THREAD = b"background_thread"
_JEMALLOC_MAX_BACKGROUND_THREADS = b"max_background_threads"
# MALLOC_CONF 中与后台线程相关、不能被子进程继承的配置项

View File

@@ -151,7 +151,6 @@ def test_thread_cache_flush_is_a_no_op_without_jemalloc(linux, monkeypatch):
def test_background_thread_enabled_at_runtime(linux, monkeypatch):
"""未配置后台线程时在主进程内开启,先设上限再打开开关,子进程环境保持不变。"""
monkeypatch.setenv("MALLOC_CONF", "narenas:8,dirty_decay_ms:5000")
mallctl = _FakeSymbol()
_use_lib(monkeypatch, _FakeLib(mallctl=mallctl))
@@ -163,7 +162,6 @@ def test_background_thread_enabled_at_runtime(linux, monkeypatch):
def test_inherited_background_thread_conf_is_stripped(linux, monkeypatch):
"""v3.0.10 镜像把后台线程写进了 MALLOC_CONF;主进程已按其生效,只需从子进程将继承的环境中去掉。"""
monkeypatch.setenv(
"MALLOC_CONF",
"background_thread:true,max_background_threads:1,narenas:8,dirty_decay_ms:5000,muzzy_decay_ms:0",