From 523cfabcdff65c9547299b3a4f721d2052c163ee Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 27 Mar 2026 04:43:55 -0700 Subject: [PATCH] build.zig: hard cap on compiler max_rss at 8G This number should never be raised. If the value is exceeded, then it is considered a bug in the Zig project that building the compiler takes more than 8G of memory. Partial revert of 1293f080fdfc74966b541b44f0a907561df3d617 Deprioritizes #31510 --- build.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index a0378668c3ce6bed1a39f0914bf6cba66b23875c..83aacca3406f69c28ce9f1666358042fee5eedac 100644 --- a/build.zig +++ b/build.zig @@ -772,7 +772,10 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu fn addCompilerStep(b: *std.Build, options: AddCompilerModOptions) *std.Build.Step.Compile { const exe = b.addExecutable(.{ .name = "zig", - .max_rss = 8_700_000_000, + // This number should never be raised. If the value is exceeded, then + // it is considered a bug in the Zig project that building the + // compiler takes more than 8G of memory. + .max_rss = 8_000_000_000, .root_module = addCompilerMod(b, options), }); exe.stack_size = stack_size; -- 2.54.0