1
1
openmpi/examples/oshmem_shmalloc.c
Mike Dubman daaf1d441d OSHMEM: added bunch of examples according to SPEC 1.0
fixed by Roman, reviewed by Igor/Mike

cmr=v1.8.2:reviewer=ompi-rm1.8

This commit was SVN r31449.
2014-04-19 05:03:44 +00:00

29 строки
468 B
C

/*
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This sample allocates (shmalloc) symmetric memory (1 long integer),
* and then frees it. Success of allocation is not checked.
*
* Produces no output.
*/
#include <shmem.h>
int main(void)
{
long *x;
start_pes(0);
x = (long *) shmalloc(sizeof(*x));
shfree(x);
}