aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-07-16 06:27:56 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-16 06:28:41 -0400
commit9d1820d20635ade6cb2dbfc36744353715653670 (patch)
treec4efb8a3cf8a31153af696120b2a6a39202336f9 /src/main.zig
parentb0fe7eef54dcaab8f7f0c18be042bf1876274ca4 (diff)
downloadzig-9d1820d20635ade6cb2dbfc36744353715653670.tar.gz
zig-9d1820d20635ade6cb2dbfc36744353715653670.zip
InternPool: reduce max tid width by one bit
@mlugg keeps stealing my bits!
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig
index 2b36c31865..15e3a212a1 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -3110,7 +3110,7 @@ fn buildOutputType(
var thread_pool: ThreadPool = undefined;
try thread_pool.init(.{
.allocator = gpa,
- .n_jobs = @min(@max(n_jobs orelse std.Thread.getCpuCount() catch 1, 1), std.math.maxInt(u8)),
+ .n_jobs = @min(@max(n_jobs orelse std.Thread.getCpuCount() catch 1, 1), std.math.maxInt(Zcu.PerThread.IdBacking)),
.track_ids = true,
});
defer thread_pool.deinit();
@@ -4961,7 +4961,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
var thread_pool: ThreadPool = undefined;
try thread_pool.init(.{
.allocator = gpa,
- .n_jobs = @min(@max(n_jobs orelse std.Thread.getCpuCount() catch 1, 1), std.math.maxInt(u8)),
+ .n_jobs = @min(@max(n_jobs orelse std.Thread.getCpuCount() catch 1, 1), std.math.maxInt(Zcu.PerThread.IdBacking)),
.track_ids = true,
});
defer thread_pool.deinit();
@@ -5399,7 +5399,7 @@ fn jitCmd(
var thread_pool: ThreadPool = undefined;
try thread_pool.init(.{
.allocator = gpa,
- .n_jobs = @min(@max(std.Thread.getCpuCount() catch 1, 1), std.math.maxInt(u8)),
+ .n_jobs = @min(@max(std.Thread.getCpuCount() catch 1, 1), std.math.maxInt(Zcu.PerThread.IdBacking)),
.track_ids = true,
});
defer thread_pool.deinit();