termux-packages/packages/openmpi/opal-mca-memory-patcher-memory_patcher_component.c.patch
2021-12-04 14:36:36 +01:00

26 lines
930 B
Diff

--- ../openmpi-4.0.2/opal/mca/memory/patcher/memory_patcher_component.c 2019-10-07 20:20:48.000000000 +0200
+++ ./opal/mca/memory/patcher/memory_patcher_component.c 2019-10-25 20:55:18.860358143 +0200
@@ -250,9 +250,9 @@
advice == MADV_FREE ||
#endif
#ifdef MADV_REMOVE
- advice == MADV_REMOVE ||
+ advice == MADV_REMOVE
#endif
- advice == POSIX_MADV_DONTNEED)
+ )
{
opal_mem_hooks_release_hook (start, length, false);
}
@@ -432,8 +432,8 @@
uintptr_t attach_addr = (uintptr_t)shmaddr;
if (shmflg & SHM_RND) {
- attach_addr -= ((uintptr_t)shmaddr) % SHMLBA;
- size += ((uintptr_t)shmaddr) % SHMLBA;
+ attach_addr -= ((uintptr_t)shmaddr) % sysconf(_SC_PAGESIZE);
+ size += ((uintptr_t)shmaddr) % sysconf(_SC_PAGESIZE);
}
opal_mem_hooks_release_hook ((void*)attach_addr, size, false);
}