diff --git a/content/shmem_malloc.tex b/content/shmem_malloc.tex index 35e845bfd..18697cb21 100644 --- a/content/shmem_malloc.tex +++ b/content/shmem_malloc.tex @@ -43,11 +43,16 @@ \CONST{NULL} pointer, the block to which it points is freed. If the space cannot be allocated, the block to which \VAR{ptr} points is unchanged. - The \FUNC{shmem\_malloc}, \FUNC{shmem\_free}, and \FUNC{shmem\_realloc} routines + The \FUNC{shmem\_malloc}, \FUNC{shmem\_align}, \FUNC{shmem\_free}, and \FUNC{shmem\_realloc} routines are provided so that multiple \ac{PE}s in a program can allocate symmetric, remotely accessible memory blocks. These memory blocks can then be used with - \openshmem communication routines. Each of these routines call the - \FUNC{shmem\_barrier\_all} routine before returning; this ensures that all + \openshmem communication routines. Each of these routines include at least one + call to a procedure that is semantically equivalent to \FUNC{shmem\_barrier\_all}: + \FUNC{shmem\_malloc} and \FUNC{shmem\_align} call a + barrier on exit; \FUNC{shmem\_free} calls a barrier on entry; and + \FUNC{shmem\_realloc} may call barriers on both entry and exit, depending on + whether an existing allocation is modified and whether new memory is allocated. + This ensures that all \ac{PE}s participate in the memory allocation, and that the memory on other \ac{PE}s can be used as soon as the local \ac{PE} returns. The user is responsible for calling these routines with identical argument(s) on all