Lines Matching defs:child
29 char *parent, *child, *parent2 = NULL, *child2 = NULL;
35 child = cg_name(root, "memcg_test_0/memcg_test_1");
36 if (!parent || !child)
45 if (cg_create(child))
48 if (cg_read_strstr(child, "cgroup.controllers", "memory"))
79 cg_destroy(child);
84 free(child);
1010 char *parent, *child;
1013 child = cg_name(root, "memcg_test_0/memcg_test_1");
1015 if (!parent || !child)
1021 if (cg_create(child))
1027 if (cg_write(child, "memory.max", "50M"))
1030 if (cg_write(child, "memory.swap.max", "0"))
1033 if (cg_write(child, "memory.oom.group", "1"))
1037 cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
1038 cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
1039 if (!cg_run(child, alloc_anon, (void *)MB(100)))
1042 if (cg_test_proc_killed(child))
1045 if (cg_read_key_long(child, "memory.events", "oom_kill ") <= 0)
1054 if (child)
1055 cg_destroy(child);
1058 free(child);
1072 char *parent, *child;
1075 child = cg_name(root, "memcg_test_0/memcg_test_1");
1077 if (!parent || !child)
1083 if (cg_create(child))
1096 cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
1097 cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
1099 if (!cg_run(child, alloc_anon, (void *)MB(100)))
1102 if (cg_test_proc_killed(child))
1110 if (child)
1111 cg_destroy(child);
1114 free(child);