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.
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.