Add CH3 APIs and macros to allow channel to implement Alloc_mem/Free_mem.
Originally MPIDI_Alloc_mem(size, info) and MPIDI_Free_mem(base_ptr) in CH3 layer are implemented by calling MPIU_Malloc(size) and MPIU_Free(base_ptr) internally. This makes the underlying hardware be unable to develop a specific implementation of Alloc_mem and Free_mem, which is necessary when registering memory for RDMA operations. This patch defines new APIs, MPIDI_CH3I_Alloc_mem(size, info) and MPIDI_CH3I_Free_mem(base_ptr), to allow channels to implement their own memory allocators. If the channel does not have its own implementation, MPICH will fallback to the default implementation in CH3 layer which uses MPIU_Malloc and MPIU_Free. Thanks to Steffen Christgau <email@example.com> for this contribution. Signed-off-by: Pavan Balaji <firstname.lastname@example.org>
Showing with 15 additions and 2 deletions