Browse Source

reworked memory leak solution in sylvan according to Tom van Dijks hints

tempestpy_adaptions
dehnert 7 years ago
parent
commit
02c23865da
  1. 9
      resources/3rdparty/sylvan/src/lace.c

9
resources/3rdparty/sylvan/src/lace.c

@ -715,9 +715,6 @@ VOID_TASK_1(lace_steal_loop, int*, quit)
} while (__lace_worker->enabled == 0);
}
}
// Unmap the virtual memory from the worker.
munmap(workers_memory[worker_id], workers_memory_size);
}
/**
@ -1091,6 +1088,12 @@ void lace_exit()
lace_resume();
lace_barrier();
// Free the memory of the workers.
for (unsigned int i=0; i<n_workers; i++) munmap(workers_memory[i], workers_memory_size);
free(workers_memory);
free(workers);
free(workers_p);
// finally, destroy the barriers
lace_barrier_destroy();
pthread_barrier_destroy(&suspend_barrier);

Loading…
Cancel
Save