mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-19 03:21:18 +00:00
config: add cgroup memory limit config
This commit is contained in:
@@ -57,10 +57,11 @@ pub fn init(app: *App) ![]const u8 {
|
||||
// of "max" because it's a soft limit that can be exceeded and
|
||||
// can be monitored by things like systemd-oomd to kill if needed,
|
||||
// versus an instant hard kill.
|
||||
// try internal_os.cgroup.configureMemoryLimit(transient, .{
|
||||
// // 1GB
|
||||
// .high = 1 * 1024 * 1024 * 1024,
|
||||
// });
|
||||
if (app.config.@"linux-cgroup-memory-limit") |limit| {
|
||||
try internal_os.cgroup.configureMemoryLimit(transient, .{
|
||||
.high = limit,
|
||||
});
|
||||
}
|
||||
|
||||
return transient;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user