Lines Matching defs:memory
111 * oom - allocates memory according to specified testcase and checks
113 * @testcase: selects how child allocates memory
116 * if zero, child keeps allocating memory until it gets killed
305 static void verify(char **memory, char value, int proc,
313 tst_res(TINFO, "child %d verifies memory content.", proc);
315 if (memcmp(memory[start], s, (end - start) * (end2 - start2))
319 if (memory[j][i] != value)
322 proc, memory[j][i], proc,
339 struct ksm_merge_data ksm_merge_data, char **memory)
358 memory[j][i] = ksm_merge_data.data;
365 memory[j-1][i-1] = 'e';
372 char **memory;
377 /* Apply for the space for memory */
378 memory = SAFE_MALLOC(total_unit * sizeof(char *));
380 memory[j] = SAFE_MMAP(NULL, unit * MB, PROT_READ|PROT_WRITE,
383 if (madvise(memory[j], unit * MB, MADV_MERGEABLE) == -1)
396 ksm_merge_data[j], memory);
405 verify(memory, 'e', child_num, total_unit - 1,
407 verify(memory, ksm_merge_data[j].data, child_num,
410 verify(memory, ksm_merge_data[j].data, child_num,
619 "at least one node with both memory and CPU "