Cache first invocation to port::AvailableRam, as it can be expensive.
| 20 | |
| 21 | // Cache first invocation to port::AvailableRam, as it can be expensive. |
| 22 | static int64_t LargeAllocationWarningBytes() { |
| 23 | static int64_t value = static_cast<int64>(port::AvailableRam() * |
| 24 | kLargeAllocationWarningThreshold); |
| 25 | return value; |
| 26 | } |
| 27 | |
| 28 | static int64_t TotalAllocationWarningBytes() { |
| 29 | static int64_t value = static_cast<int64>(port::AvailableRam() * |
no test coverage detected