Skip to content

Commit

Permalink
Merge pull request #2 from LLNL/hydrogen
Browse files Browse the repository at this point in the history
SendRecv bugs, add support for annotations
  • Loading branch information
a0x8o authored Nov 26, 2024
2 parents 913d128 + a7be48c commit f6bce6c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/core/MemoryPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@

namespace El
{
bool details::debug_mempool() noexcept
{
char const* const env = std::getenv("H_MEMPOOL_DEBUG");
return (env && std::strlen(env) && env[0] != '0');
}

float details::default_mempool_bin_growth() noexcept
{
char const* const env = std::getenv("H_MEMPOOL_BIN_GROWTH");
return (env ? std::stof(env) : 1.6);
}

size_t details::default_mempool_min_bin() noexcept
{
char const* const env = std::getenv("H_MEMPOOL_MIN_BIN");
return (env ? std::stoull(env) : 1UL);
}

size_t details::default_mempool_max_bin() noexcept
{
char const* const env = std::getenv("H_MEMPOOL_MAX_BIN");
return (env ? std::stoull(env) : (1 << 26));
}

namespace
{
Expand Down

0 comments on commit f6bce6c

Please sign in to comment.