Home | History | Annotate | Download | only in lib

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
328 static void verify(char **memory, char value, int proc,
336 tst_res(TINFO, "child %d verifies memory content.", proc);
338 if (memcmp(memory[start], s, (end - start) * (end2 - start2))
342 if (memory[j][i] != value)
345 proc, memory[j][i], proc,
369 struct ksm_merge_data ksm_merge_data, char **memory)
388 memory[j][i] = ksm_merge_data.data;
395 memory[j-1][i-1] = 'e';
402 char **memory;
407 /* Apply for the space for memory */
408 memory = SAFE_MALLOC(total_unit * sizeof(char *));
410 memory[j] = SAFE_MMAP(NULL, unit * MB, PROT_READ|PROT_WRITE,
413 if (madvise(memory[j], unit * MB, MADV_MERGEABLE) == -1)
426 ksm_merge_data[j], memory);
435 verify(memory, 'e', child_num, total_unit - 1,
437 verify(memory, ksm_merge_data[j].data, child_num,
440 verify(memory, ksm_merge_data[j].data, child_num,
566 char **memory;
588 memory = SAFE_MALLOC(num_nodes * sizeof(char *));
590 memory[i] = SAFE_MMAP(NULL, length, PROT_READ|PROT_WRITE,
593 if (madvise(memory[i], length, MADV_MERGEABLE) == -1)
602 * length size memory.
604 ret = mbind(memory[i], length, MPOL_BIND, nmask, MAXNODES, 0);
609 memset(memory[i], 10, length);
828 "at least one node with both memory and CPU "