HOME
| OPENMP API Specification: Version 5.1 November 2020

3.13.7  omp_free

Summary The omp_free routine deallocates previously allocated memory.

Format

SVG-Viewer needed.

 

 
void omp_free (void *ptr, omp_allocator_handle_t allocator);  

SVG-Viewer needed.

SVG-Viewer needed.

 

 
void omp_free( 
  void *ptr, 
  omp_allocator_handle_t allocator=omp_null_allocator 
);  

SVG-Viewer needed.

SVG-Viewer needed.

 

 
subroutine omp_free(ptr, allocator) bind(c) 
use, intrinsic :: iso_c_binding, only : c_ptr 
type(c_ptr), value :: ptr 
integer(omp_allocator_handle_kind), value :: allocator  

SVG-Viewer needed.

Binding The binding task set for an omp_free region is the generating task.

Effect The omp_free routine deallocates the memory to which ptr points. The ptr argument must have been returned by an OpenMP allocation routine. If the allocator argument is specified it must be the memory allocator to which the allocation request was made. If the allocator argument is omp_null_allocator the implementation will determine that value automatically.

If ptr is NULL (or, C_NULL_PTR, for Fortran), no operation is performed.

SVG-Viewer needed.

The omp_free routine requires an explicit interface and so might not be provided in omp_lib.h.

SVG-Viewer needed.

Restrictions The restrictions to the omp_free routine are as follows:

Cross References