-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedapi-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Memoryhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
public static partial class MemoryMarshal
{
public static object GetOwner(ReadOnlyMemory<T> readOnlyMemory)
}With Registered IO; when sending an receiving data the api doesn't use address, offset, length; it uses id, offset, length
The ids are assigned upfront when you register the addresses (once)
Currently you have to loop through all the registered memory blocks to find which one matches and then get its id which is inefficient and also has to protect against concurrency of new memory being registered while its searching.
This search and registration blocking could be avoided with the new api
if (GetOwner(readOnlyMemory) is RioMemoryPoolBlock block)
{
var idToUse = block.Id;
}
else
{
// Not registered memory, get registered memory block and copy data
}Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedapi-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Memoryhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors