diff --git a/oshmem/mca/memheap/base/memheap_base_static.c b/oshmem/mca/memheap/base/memheap_base_static.c index 3385eac017d..15f9a1d12da 100644 --- a/oshmem/mca/memheap/base/memheap_base_static.c +++ b/oshmem/mca/memheap/base/memheap_base_static.c @@ -14,6 +14,7 @@ #include "oshmem/proc/proc.h" #include "oshmem/mca/memheap/memheap.h" #include "oshmem/mca/memheap/base/base.h" +#include "oshmem/mca/sshmem/base/base.h" #include "oshmem/util/oshmem_util.h" #include @@ -51,6 +52,14 @@ int mca_memheap_base_static_init(mca_memheap_map_t *map) return OSHMEM_ERROR; } +#ifdef __linux__ + extern unsigned _end; + if (mca_sshmem_base_start_address < (uintptr_t)&_end) { + MEMHEAP_WARN("sshmem base start address is inside data region" + " (%p < %p)", mca_sshmem_base_start_address, &_end); + } +#endif + while (NULL != fgets(line, sizeof(line), fp)) { if (3 > sscanf(line, "%llx-%llx %s %llx %s %llx %s", diff --git a/oshmem/mca/sshmem/base/sshmem_base_open.c b/oshmem/mca/sshmem/base/sshmem_base_open.c index 8f14a37fcb8..08845df6de6 100644 --- a/oshmem/mca/sshmem/base/sshmem_base_open.c +++ b/oshmem/mca/sshmem/base/sshmem_base_open.c @@ -37,6 +37,8 @@ */ #if UINTPTR_MAX == 0xFFFFFFFF void *mca_sshmem_base_start_address = (void*)0; +#elif defined(__aarch64__) +void* mca_sshmem_base_start_address = (void*)0xAB0000000000; #else void* mca_sshmem_base_start_address = (void*)0xFF000000; #endif