Skip to content

Commit 1c33d5a

Browse files
authored
Merge pull request #7141 from devreal/shmem_memheap_alloc_band
Shmem: use bitwise and instead of logical and to check for allocator capabilities
2 parents 30171cb + 9f2c6a4 commit 1c33d5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oshmem/mca/memheap/base/memheap_base_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int mca_memheap_alloc_with_hint(size_t size, long hint, void** ptr)
7070

7171
for (i = 0; i < mca_memheap_base_map.n_segments; i++) {
7272
map_segment_t *s = &mca_memheap_base_map.mem_segs[i];
73-
if (s->allocator && (hint && s->alloc_hints)) {
73+
if (s->allocator && (hint & s->alloc_hints)) {
7474
/* Do not fall back to default allocator since it will break the
7575
* symmetry between PEs
7676
*/

0 commit comments

Comments
 (0)