mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 03:31:12 +08:00
feat: 环境变量开启 GC 压力模式,每顶层指令边界强制完整收集
This commit is contained in:
@@ -57,6 +57,10 @@ pub(crate) struct GcState {
|
||||
/// 宿主强制收集旗标(`$262.gc()`):native 重入中置位,由下一个顶层
|
||||
/// 指令边界(完整收集的唯一安全点:无在途 builtin 局部裸指针)消费。
|
||||
pub(crate) pending_forced_collect: bool,
|
||||
/// GC 压力模式开关(构造时读环境变量 `OXIDE_GC_PRESSURE`,存在即开):
|
||||
/// 开启后每个顶层指令边界做一次完整收集,与强制收集共用同一安全点入口,
|
||||
/// 同时跳过两个水位触发的档(完整收集已涵盖其全部工作)。
|
||||
pub(crate) gc_pressure_mode: bool,
|
||||
}
|
||||
|
||||
impl GcState {
|
||||
|
||||
Reference in New Issue
Block a user