Skip to content

Commit

Permalink
Merge pull request #38 from davidozog/pr/mem_manage_barriers
Browse files Browse the repository at this point in the history
Specify entry/exit for barrier in memory management routines
  • Loading branch information
jdinan authored Mar 22, 2017
2 parents 018862f + bf356e5 commit fc2c016
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions content/shmem_malloc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc2c016

Please sign in to comment.