Merge pull request #6083 from devreal/rdma-plug-memleak
Plug two memory leaks in rdma osc
Этот коммит содержится в:
Коммит
5ebcbe444e
@ -586,6 +586,7 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 == local_rank) {
|
||||||
/* allocate the shared memory segment */
|
/* allocate the shared memory segment */
|
||||||
ret = opal_asprintf (&data_file, "%s" OPAL_PATH_SEP "osc_rdma.%s.%x.%d",
|
ret = opal_asprintf (&data_file, "%s" OPAL_PATH_SEP "osc_rdma.%s.%x.%d",
|
||||||
mca_osc_rdma_component.backing_directory, ompi_process_info.nodename,
|
mca_osc_rdma_component.backing_directory, ompi_process_info.nodename,
|
||||||
@ -595,7 +596,6 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == local_rank) {
|
|
||||||
/* allocate enough space for the state + data for all local ranks */
|
/* allocate enough space for the state + data for all local ranks */
|
||||||
ret = opal_shmem_segment_create (&module->seg_ds, data_file, total_size);
|
ret = opal_shmem_segment_create (&module->seg_ds, data_file, total_size);
|
||||||
free (data_file);
|
free (data_file);
|
||||||
|
@ -111,7 +111,7 @@ int ompi_osc_rdma_free(ompi_win_t *win)
|
|||||||
|
|
||||||
OBJ_DESTRUCT(&module->peer_hash);
|
OBJ_DESTRUCT(&module->peer_hash);
|
||||||
} else if (NULL != module->comm) {
|
} else if (NULL != module->comm) {
|
||||||
for (int i = 0 ; i < ompi_comm_rank (module->comm) ; ++i) {
|
for (int i = 0 ; i < ompi_comm_size (module->comm) ; ++i) {
|
||||||
if (NULL != module->peer_array[i]) {
|
if (NULL != module->peer_array[i]) {
|
||||||
OBJ_RELEASE(module->peer_array[i]);
|
OBJ_RELEASE(module->peer_array[i]);
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user