Skip to content

Commit 6a7154b

Browse files
committed
oshmem/shmem: Allocate and exchange base segment address beforehand
Signed-off-by: Thomas Vegas <[email protected]>
1 parent 019badb commit 6a7154b

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

oshmem/mca/memheap/base/memheap_base_select.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static memheap_context_t* _memheap_create(void)
254254
return NULL;
255255
}
256256

257-
/* Inititialize symmetric area */
257+
/* Initialize symmetric area */
258258
rc = mca_memheap_base_alloc_init(&mca_memheap_base_map,
259259
user_size + MEMHEAP_BASE_PRIVATE_SIZE, 0,
260260
"regular_mem");

oshmem/mca/memheap/base/memheap_base_static.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,9 @@ static int _check_address(void *start, void **end)
170170
/**
171171
* SGI shmem only supports globals&static in main program.
172172
* It does not support them in shared objects or in dlopen()
173-
* (Clarified on PGAS 2011 tutorial)
173+
* (Clarified on PGAS 2011 tutorial).
174174
*
175-
* So ignored any maps that start higher then process _end
176-
* FIXME: make sure we do not register symmetric heap twice
177-
* if we decide to allow shared objects
175+
* So ignored any maps that start higher then process _end.
178176
*/
179177
if ((uintptr_t)start > data_end) {
180178
MEMHEAP_VERBOSE(100,

oshmem/mca/sshmem/mmap/sshmem_mmap_module.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ segment_create(map_segment_t *ds_buf,
126126
/* init the contents of map_segment_t */
127127
shmem_ds_reset(ds_buf);
128128

129-
(void)munmap(mca_sshmem_base_start_address, size);
130129
addr = mmap((void *)mca_sshmem_base_start_address,
131130
size,
132131
PROT_READ | PROT_WRITE,

0 commit comments

Comments
 (0)