7
#include "stream_lib.h"
14
char *policy = "default";
16
/* Run STREAM with a numa policy */
17
int main(int ac, char **av)
19
struct bitmask *nodes;
24
policy = parse_policy(av[1], av[2]);
26
nodes = numa_allocate_nodemask();
29
nodes = numa_parse_nodestring(av[2]);
31
printf ("<%s> is invalid\n", av[2]);
34
size = stream_memsize();
35
map = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
37
if (map == (char*)-1) exit(1);
38
if (mbind(map, size, policy, nodes->maskp, nodes->size, 0) < 0)
39
perror("mbind"), exit(1);