IPC Shared Memory Release#1061
Conversation
| { | ||
| const std::size_t ps = page_size(); | ||
| for (std::size_t i = 0; i < bytes; i += ps) { | ||
| buffer[i] = static_cast<std::uint8_t>(buffer[i] + 1); |
There was a problem hiding this comment.
Why not simplify to ++buffer[i];?
| allocator.release(); | ||
|
|
||
| const std::size_t rss_after_release = umpire::get_process_memory_usage(); | ||
| std::cout << "RSS after allocator.release(): " << format_bytes(rss_after_release) << "\n"; |
There was a problem hiding this comment.
"allocator.release()" should probably be changed to "release" to match the other output.
|
|
||
| #include "umpire/ResourceManager.hpp" | ||
| #include "umpire/config.hpp" | ||
| #if defined(UMPIRE_ENABLE_IPC_SHARED_MEMORY) |
There was a problem hiding this comment.
Is it a different file included for MPI shared memory?
| const std::size_t ps = page_size(); | ||
|
|
||
| for (std::size_t i = 0; i < bytes; i += ps) { | ||
| buffer[i] = static_cast<std::uint8_t>(buffer[i] + 1); |
There was a problem hiding this comment.
Why not simplify to ++buffer[i];?
|
I've got a use case where I need to read a mesh from a file, make the mesh accessible on every MPI rank, do some processing, then completely free all memory associated with the mesh. Is that accomplished by calling release or some other way? In a related scenario I could imagine keeping a shared memory allocator around with enough memory for the largest mesh in a collection of meshes. Each mesh is read in, processed, then discarded. Would shared memory usage keep growing without release? |
|
I'm approving, but please address my remaining comments. |
No description provided.