termux-packages/packages/openmpi/opal-mca-memory-patcher-memory_patcher_component.c.patch

26 lines
930 B
Diff
Raw Normal View History

2019-10-25 21:16:53 +02:00
--- ../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
2017-11-22 19:38:47 +01:00
#ifdef MADV_REMOVE
- advice == MADV_REMOVE ||
+ advice == MADV_REMOVE
#endif
- advice == POSIX_MADV_DONTNEED)
+ )
{
opal_mem_hooks_release_hook (start, length, false);
}
2019-10-25 21:16:53 +02:00
@@ -432,8 +432,8 @@
uintptr_t attach_addr = (uintptr_t)shmaddr;
2017-11-22 19:38:47 +01:00
2019-10-25 21:16:53 +02:00
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);
}