Lines Matching refs:children

268 	char *children[4] = {NULL};
315 for (i = 0; i < ARRAY_SIZE(children); i++) {
316 children[i] = cg_name_indexed(parent[1], "child_memcg", i);
317 if (!children[i])
320 if (cg_create(children[i]))
326 cg_run_nowait(children[i], alloc_pagecache_50M_noexit,
334 if (cg_write(children[0], "memory.min", "75M"))
336 if (cg_write(children[1], "memory.min", "25M"))
338 if (cg_write(children[2], "memory.min", "500M"))
340 if (cg_write(children[3], "memory.min", "0"))
357 for (i = 0; i < ARRAY_SIZE(children); i++)
358 c[i] = cg_read_long(children[i], "memory.current");
378 for (i = ARRAY_SIZE(children) - 1; i >= 0; i--) {
379 if (!children[i])
382 cg_destroy(children[i]);
383 free(children[i]);
424 char *children[4] = {NULL};
470 for (i = 0; i < ARRAY_SIZE(children); i++) {
471 children[i] = cg_name_indexed(parent[1], "child_memcg", i);
472 if (!children[i])
475 if (cg_create(children[i]))
481 if (cg_run(children[i], alloc_pagecache_50M, (void *)(long)fd))
489 if (cg_write(children[0], "memory.low", "75M"))
491 if (cg_write(children[1], "memory.low", "25M"))
493 if (cg_write(children[2], "memory.low", "500M"))
495 if (cg_write(children[3], "memory.low", "0"))
504 for (i = 0; i < ARRAY_SIZE(children); i++)
505 c[i] = cg_read_long(children[i], "memory.current");
522 for (i = 0; i < ARRAY_SIZE(children); i++) {
523 oom = cg_read_key_long(children[i], "memory.events", "oom ");
524 low = cg_read_key_long(children[i], "memory.events", "low ");
537 for (i = ARRAY_SIZE(children) - 1; i >= 0; i--) {
538 if (!children[i])
541 cg_destroy(children[i]);
542 free(children[i]);