1 /*
2 * Copyright (c) 2014-2016 Mellanox Technologies, Inc.
3 * All rights reserved.
4 * $COPYRIGHT$
5 *
6 * Additional copyrights may follow
7 *
8 * $HEADER$
9 *
10 * This sample allocates (shmalloc) symmetric memory (1 long integer),
11 * and then frees it. Success of allocation is not checked.
12 *
13 * Produces no output.
14 */
15
16 #include <shmem.h>
17
18 int main(void)
19 {
20 long *x;
21
22 shmem_init();
23
24 x = (long *) shmem_malloc(sizeof(*x));
25
26 shmem_free(x);
27
28 shmem_finalize();
29 }
30