MCPcopy Create free account
hub / github.com/ioi/isolate / cg_enter

Function cg_enter

cg.c:226–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void
227cg_enter(void)
228{
229 if (!cg_enable)
230 return;
231
232 msg("Entering control group %s\n", cg_name);
233
234 cg_write("cgroup.procs", "%d\n", (int) getpid());
235
236 if (cg_memory_limit)
237 {
238 cg_write("memory.max", "%lld\n", (long long) cg_memory_limit << 10);
239 cg_write("?memory.swap.max", "0\n");
240 }
241
242 struct cf_per_box *cf = cf_current_box();
243 if (cf->cpus)
244 cg_write("cpuset.cpus", "%s", cf->cpus);
245 if (cf->mems)
246 cg_write("cpuset.mems", "%s", cf->mems);
247}
248
249static int
250raw_get_run_time_ms(void)

Callers 1

box_insideFunction · 0.85

Calls 3

msgFunction · 0.85
cg_writeFunction · 0.85
cf_current_boxFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…