From 909b98ba77c196a54d5dc1c37dd3c2f0475f1384 Mon Sep 17 00:00:00 2001 From: Yanfei Guo Date: Thu, 9 Jun 2022 14:47:03 -0500 Subject: [PATCH] Add interface for shmem_malloc_with_hints. --- include/shmem.h.in.tpl | 5 +++++ src/shmem/mem.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/include/shmem.h.in.tpl b/include/shmem.h.in.tpl index 43aa1fa4..a87ba8c7 100644 --- a/include/shmem.h.in.tpl +++ b/include/shmem.h.in.tpl @@ -91,6 +91,10 @@ typedef struct { #define SHMEM_TEAM_SHARED (shmem_team_t) 0x90001 #define SHMEM_TEAM_INVALID NULL +/* SHMEM malloc hints */ +#define SHMEM_MALLOC_ATOMICS_REMOTE 0x002001L +#define SHMEM_MALLOC_SIGNAL_REMOTE 0x002002L + /* Context option constants (long) and type */ #define SHMEM_CTX_SERIALIZED 0x001001L #define SHMEM_CTX_PRIVATE 0x001002L @@ -165,6 +169,7 @@ void *shmem_malloc(size_t size); void shmem_free(void *ptr); void *shmem_realloc(void *ptr, size_t size); void *shmem_align(size_t alignment, size_t size); +void *shmem_malloc_with_hints(size_t size, long hints); void *shmem_calloc(size_t count, size_t size); /* (deprecated APIs) */ void *shmalloc(size_t size); diff --git a/src/shmem/mem.c b/src/shmem/mem.c index 4cef1cad..661e706b 100644 --- a/src/shmem/mem.c +++ b/src/shmem/mem.c @@ -37,6 +37,12 @@ void *shmem_align(size_t alignment, size_t size) return ptr; } +void *shmem_malloc_with_hints(size_t size, long hints) +{ + OSHMPI_ASSERT(0); + return NULL; +} + void *shmem_calloc(size_t count, size_t size) { void *ptr = NULL;