1/**
2 * \file
3 * \brief Test the LUA interpreter library
4 */
5/*
6 * Copyright (c) 2013, ETH Zurich.
7 * All rights reserved.
8 *
9 * This file is distributed under the terms in the attached LICENSE file.
10 * If you do not find this file, copies can be found by writing to:
11 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
12 */
13
14#include <barrelfish/barrelfish.h>
15
16#include <numa.h>
17
18
19int main (void)
20{
21    debug_printf("numa test started...\n");
22
23    if (numa_available() == SYS_ERR_OK) {
24        debug_printf("num nodes=%u\n", numa_max_node() + 1);
25        debug_printf("num cores: %u\n", numa_max_core() + 1);
26
27        debug_printf("interleaved test\n");
28        void *buf = numa_alloc_interleaved(1024*1024, 4096);
29
30        debug_printf("alloc on node test\n");
31        buf = numa_alloc_onnode(1024*1024, 0, 4096);
32
33        debug_printf("normal alloc test\n");
34        buf = numa_alloc(1024*1024, 4096);
35
36    } else {
37        debug_printf("numa not available\n");
38    }
39    return 0;
40}
41