]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Add basic library allocator support.
authorTobias Burnus <tobias@codesourcery.com>
Wed, 15 Jul 2020 07:54:28 +0000 (09:54 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 15 Jul 2020 07:54:28 +0000 (09:54 +0200)
commit0015352575aa548839047e7a298ecf7dee94981a
tree75cf8fc4821f00b5e6e58ca65d7501fc92cf89ae
parent2cfecf4c0b24a3ff4ee3f6bcf789566749e6fcf5
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.

(cherry picked from commit e107157171af25f6c89be02d62b0a7235a5c988d)
libgomp/allocator.c [new file with mode: 0644]