| 909 | #endif |
| 910 | |
| 911 | void Arena::ArenaProfiler::profile_alloc ([[maybe_unused]] void* ptr, |
| 912 | [[maybe_unused]] std::size_t nbytes) { |
| 913 | #ifdef AMREX_TINY_PROFILING |
| 914 | if (m_do_profiling) { |
| 915 | std::scoped_lock lock(m_arena_profiler_mutex); |
| 916 | MemStat* stat = TinyProfiler::memory_alloc(nbytes, m_profiling_stats); |
| 917 | if (stat) { |
| 918 | m_currently_allocated.insert({ptr, {stat, nbytes}}); |
| 919 | } |
| 920 | } |
| 921 | #endif |
| 922 | } |
| 923 | |
| 924 | void Arena::ArenaProfiler::profile_free ([[maybe_unused]] void* ptr) { |
| 925 | #ifdef AMREX_TINY_PROFILING |