standards-proposals
standards-proposals copied to clipboard
CP013: Missing a memory context if there are separate memory resources?
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.
Related to #49
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.
I am removing the RAP18 label since this is something we can address after the meeting