DASH
0.3.0
|
The MemorySpace
concept follows the STL std::pmr::memory_resource
.
More...
#include <MemorySpaceBase.h>
The MemorySpace
concept follows the STL std::pmr::memory_resource
.
Unlinke shared memory systems where process memory and virtual address translation is realized as system functions and hardware components, PGAS memory resources are also responsible for maintaining and propagating the size and structure of their underlying local memory ranges.
Consequently, the memory resource concept is extended by methods and type definitions that are required to maintain global pointer arithmetics and named Memory Space in DASH.
STL Reference of std::pmr::memory_resource
: http://en.cppreference.com/w/cpp/memory/memory_resource
Defining MemorySpace
as class template seems to contradict the intention to use it as polymorphic base class as subclass types of MemorySpace<T>
and MemorySpace<U>
have incompatible polymorphic base classes. This looks like the kind of unintentional type incompatibility that lead to the introduction of polymorphic allocators. However, the template parameter specifies the memory space domain and two types of MemorySpace
are in fact incompatible if they do not refer to the same domain, like global and local address space.
Clarify: The STL memory_resource concept assumes that any type can be allocated with its size specified in number of bytes so untyped allocation with void pointers is practicable. However, the DART allocation routines are typed for correctness considerations and to optimize communication. If the memory space concept complies to the STL memory_resource interface, only DART_TYPE_BYTE instead of the actual value type is available. This would therefore harm stability and performance.
Definition at line 65 of file MemorySpaceBase.h.