| 217 | } |
| 218 | |
| 219 | void |
| 220 | BARef::updateMemoryUsage_hash (int s) |
| 221 | { |
| 222 | if (hash.size() > 0) { |
| 223 | Long b = sizeof(hash); |
| 224 | for (const auto& x: hash) { |
| 225 | b += amrex::gcc_map_node_extra_bytes |
| 226 | + sizeof(IntVect) + amrex::bytesOf(x.second); |
| 227 | } |
| 228 | if (s > 0) { |
| 229 | total_hash_bytes += b; |
| 230 | total_hash_bytes_hwm = std::max(total_hash_bytes_hwm, total_hash_bytes); |
| 231 | } else { |
| 232 | total_hash_bytes -= b; |
| 233 | } |
| 234 | } |
| 235 | } |
| 236 | #endif |
| 237 | |
| 238 | void |
no test coverage detected