openmp: Add basic library allocator support.
authorJakub Jelinek <jakub@redhat.com>
Tue, 19 May 2020 12:02:04 +0000 (14:02 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 19 May 2020 12:08:11 +0000 (14:08 +0200)
commite107157171af25f6c89be02d62b0a7235a5c988d
treeeb61f48565760dba8914fe6820c35c367c0fd205
parent4f85a52c9424bb9ac606ec0f6f3da30e020161ad
openmp: Add basic library allocator support.

This patch adds very basic allocator support (omp_{init,destroy}_allocator,
omp_{alloc,free}, omp_[sg]et_default_allocator).
The plan is to use memkind (likely dlopened) for high bandwidth memory, but
that part isn't implemented yet, probably mlock for pinned memory and see
what other options there are for other kinds of memory.
For offloading targets, we need to decide if we want to support the
dynamic allocators (and on which targets), or if e.g. all we do is at compile
time replace omp_alloc/omp_free calls with constexpr predefined allocators
with something special.

And allocate directive and allocator/uses_allocators clauses are future work
too.

2020-05-19  Jakub Jelinek  <jakub@redhat.com>

* allocator.c: New file.
libgomp/allocator.c [new file with mode: 0644]