Skip to content

Commit f6017e4

Browse files
authored
Merge pull request #8309 from devreal/fix-mem-debug-build-v4.0.x
oshmem/mca/sshmem: Fix build with `--enable-mem-debug` [4.0.x]
2 parents c4c4d6d + 88c59bd commit f6017e4

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

oshmem/mca/memheap/base/memheap_base_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int mca_memheap_alloc_with_hint(size_t size, long hint, void** ptr)
8484
/* Do not fall back to default allocator since it will break the
8585
* symmetry between PEs
8686
*/
87-
return s->allocator->realloc(s, size, NULL, ptr);
87+
return s->allocator->sa_realloc(s, size, NULL, ptr);
8888
}
8989
}
9090

oshmem/mca/sshmem/sshmem_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ typedef struct map_segment {
124124
} map_segment_t;
125125

126126
struct segment_allocator {
127-
int (*realloc)(map_segment_t*, size_t newsize, void *, void **);
128-
int (*free)(map_segment_t*, void*);
127+
int (*sa_realloc)(map_segment_t*, size_t newsize, void *, void **);
128+
int (*sa_free)(map_segment_t*, void*);
129129
};
130130

131131
END_C_DECLS

oshmem/mca/sshmem/ucx/sshmem_ucx_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ module_finalize(void)
9797
/* ////////////////////////////////////////////////////////////////////////// */
9898

9999
static segment_allocator_t sshmem_ucx_allocator = {
100-
.realloc = sshmem_ucx_memheap_realloc,
101-
.free = sshmem_ucx_memheap_free
100+
.sa_realloc = sshmem_ucx_memheap_realloc,
101+
.sa_free = sshmem_ucx_memheap_free
102102
};
103103

104104
static int

oshmem/shmem/c/shmem_free.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static inline void _shfree(void* ptr)
6262
}
6363

6464
if (s && s->allocator) {
65-
rc = s->allocator->free(s, ptr);
65+
rc = s->allocator->sa_free(s, ptr);
6666
} else {
6767
rc = MCA_MEMHEAP_CALL(free(ptr));
6868
}

oshmem/shmem/c/shmem_realloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static inline void* _shrealloc(void *ptr, size_t size)
5656
}
5757

5858
if (s && s->allocator) {
59-
rc = s->allocator->realloc(s, size, ptr, &pBuff);
59+
rc = s->allocator->sa_realloc(s, size, ptr, &pBuff);
6060
} else {
6161
rc = MCA_MEMHEAP_CALL(realloc(size, ptr, &pBuff));
6262
}

0 commit comments

Comments
 (0)