nightduck / rmw_hazcat

Apache License 2.0
0 stars 0 forks source link

Return to local/shared hybrid model for allocator mapping #14

Closed nightduck closed 2 years ago

nightduck commented 2 years ago

Each allocator has 3 portions: a local mapping to store function pointers, a shared mapping containing metadata and visible across processes, and mapped device memory with the actual allocations.

The first must be a multiple of page size, the second a multiple of the SHMLBA variable, and the third a multiple of some device-specific granularity. Call these values A, B, and C. B and C are multiples of A.

Glossing over some number theory, the device memory should be mapped at an address that is divisible by the least-common-multiple of B and C, provided there is enough room after said address for device mapping, and enough memory prior to it for the local and shared mappings.

nightduck commented 2 years ago

7f0063f1d963855f76ff74ebe0a30cadb9511db2 52a956c3cb119eff822bc031383edf01b0bac5c3 7439c2a375e85875b9ed22faa777b914fcae1182