Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
goto ERROR;
}
+ // Limit memory
+ size_t memory_limit = pakfire_config_get_bytes(config, "build", "memory_limit", 0);
+ if (memory_limit) {
+ r = pakfire_cgroup_set_memory_limit(build->cgroup, memory_limit);
+ if (r)
+ goto ERROR;
+ }
+
// Set PID limit
size_t pid_limit = pakfire_config_get_int(config, "build",
"pid_limit", PAKFIRE_BUILD_PID_LIMIT);
# Guaranteed memory for the build environment
memory_guaranteed = 256M
+# Memory limit for the build environment
+memory_limit = 1G
+
# PID limit for the build environment
pid_limit = 512