| OPENMP API Specification: Version 5.0 November 2018

2.11.4  allocate Clause

SummaryThe allocate clause specifies the memory allocator to be used to obtain storage for private variables of a directive.


The syntax of the allocate clause is as follows:  

allocate([allocator:] list)  

SVG-Viewer needed.

where allocator is an expression of the omp_allocator_handle_t type.

SVG-Viewer needed.

SVG-Viewer needed.

where allocator is an integer expression of the omp_allocator_handle_kindkind.

SVG-Viewer needed.

Description The storage for new list items that arise from list items that appear in the directive will be provided through a memory allocator. If an allocator is specified in the clause, that allocator will be used for allocations. For all directives except the target directive, if no allocator is specified in the clause then the memory allocator that is specified by the def-allocator-var ICV will be used for the list items that are specified in the allocate clause. The allocation of each list item will be byte aligned to at least the alignment required by the base language for the type of that list item.

For allocations that arise from this clause the null_fb value of the fallback allocator trait will behave as if the abort_fb had been specified.


Cross References