Memory management routines

Memory management routines#

ROCSHMEM_MALLOC#

__host__ void *rocshmem_malloc(size_t size)#
Parameters:

size – Memory allocation size in bytes.

Returns:

A pointer to the allocated memory on the symmetric heap. If a valid allocation cannot be made, it returns NULL.

Description: This routine allocates memory of size bytes from the symmetric heap. This is a collective operation and must be called by all PEs.

ROCSHMEM_FREE#

__host__ void rocshmem_free(void *ptr)#
Parameters:

ptr – A pointer to previously allocated memory on the symmetric heap.

Returns:

None.

Description: This routine frees a memory allocation from the symmetric heap. It is a collective operation and must be called by all PEs.