standards-proposals icon indicating copy to clipboard operation
standards-proposals copied to clipboard

CP013: Missing a memory context if there are separate memory resources?

Open Ruyk opened this issue 7 years ago • 3 comments
trafficstars

I wonder if we need a memory_context similar to the execution_context that has the allocation capabilities, e.g, you retrieve an allocator that is bound to the memory resource. This allows implementation to add the machinery required to allocate or to bind allocation on the memory_context itself.

Ruyk avatar May 04 '18 09:05 Ruyk

Related to #49

Ruyk avatar May 05 '18 22:05 Ruyk

Yes you're right, I think we will since we are separating the execution and memory topologies there will now be no object which you can construct from a memory resource in the same way we do for execution resources. Though perhaps this type can be an allocator directly, so in the same way pmr memory resources can be passed into a pmr allocator we could have a memory resource type which derives from the pmr memory resource and is then passed into a concrete affinity aware allocator type such as resource_allocator. This type could have additional mechanism for performing affinity aware allocations such as first-touch if they are supported, which call down to the memory resource for how to allocate memory on the specific resource.

AerialMantis avatar May 06 '18 00:05 AerialMantis

I am removing the RAP18 label since this is something we can address after the meeting

Ruyk avatar May 06 '18 21:05 Ruyk