mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Patching macos compile
This commit is contained in:
parent
ba27cc6571
commit
aed5de4d50
@ -215,8 +215,10 @@ void CartesianCommunicator::Init(int *argc, char ***argv) {
|
|||||||
perror("open hugetlbfs");
|
perror("open hugetlbfs");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
int mmap_flag = MAP_SHARED ;
|
||||||
int mmap_flag = MAP_SHARED |MAP_POPULATE;
|
#ifdef MAP_POPULATE
|
||||||
|
mmap_flag|=MAP_POPULATE;
|
||||||
|
#endif
|
||||||
#ifdef MAP_HUGETLB
|
#ifdef MAP_HUGETLB
|
||||||
if ( Hugepages ) mmap_flag |= MAP_HUGETLB;
|
if ( Hugepages ) mmap_flag |= MAP_HUGETLB;
|
||||||
#endif
|
#endif
|
||||||
@ -249,7 +251,10 @@ void CartesianCommunicator::Init(int *argc, char ***argv) {
|
|||||||
if ( fd < 0 ) { perror("failed shm_open"); assert(0); }
|
if ( fd < 0 ) { perror("failed shm_open"); assert(0); }
|
||||||
ftruncate(fd, size);
|
ftruncate(fd, size);
|
||||||
|
|
||||||
int mmap_flag = MAP_SHARED|MAP_POPULATE;
|
int mmap_flag = MAP_SHARED;
|
||||||
|
#ifdef MAP_POPULATE
|
||||||
|
mmap_flag |= MAP_POPULATE;
|
||||||
|
#endif
|
||||||
#ifdef MAP_HUGETLB
|
#ifdef MAP_HUGETLB
|
||||||
if (Hugepages) mmap_flag |= MAP_HUGETLB;
|
if (Hugepages) mmap_flag |= MAP_HUGETLB;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user