OSHMEM: Fix mmap compatibility issue
Using MAP_ANONYMOUS brings different interpretation of fd, offset arguuments of mmap() Linux: The mapping is not backed by any file; the fd and offset arguments are ignored. Mac: Map anonymous memory not associated with any specific file. The offset argument is ignored. Mac OS X specific: the file descriptor used for creating MAP_ANON regions can be used to pass some Mach VM flags, and can be specified as -1 if no such flags are associated with the region FreeBSD: Map anonymous memory not associated with any specific file. The file descriptor used for creating MAP_ANON must be -1. The offset argument must be 0. fixed by Igor, reviewed by Mike Refs trac:4399 cmr=v1.7.5:reviewer=ompi-rm1.7 This commit was SVN r31140. The following Trac tickets were found above: Ticket 4399 --> https://svn.open-mpi.org/trac/ompi/ticket/4399
Этот коммит содержится в:
родитель
f7df960198
Коммит
9314e9f0a3
@ -188,7 +188,7 @@ segment_create(map_segment_t *ds_buf,
|
||||
MAP_ANONYMOUS |
|
||||
#endif
|
||||
MAP_FIXED,
|
||||
0,
|
||||
-1,
|
||||
0);
|
||||
|
||||
if (MAP_FAILED == addr) {
|
||||
@ -243,7 +243,7 @@ segment_attach(map_segment_t *ds_buf, sshmem_mkey_t *mkey)
|
||||
MAP_ANONYMOUS |
|
||||
#endif
|
||||
MAP_FIXED,
|
||||
0,
|
||||
-1,
|
||||
0);
|
||||
|
||||
if (MAP_FAILED == addr) {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user