Gets the maximum bytes value
| 265 | |
| 266 | // Gets the maximum bytes value |
| 267 | int64_t CacheDisk::GetBytes() |
| 268 | { |
| 269 | // Create a scoped lock, to protect the cache from multiple threads |
| 270 | const std::lock_guard<std::recursive_mutex> lock(*cacheMutex); |
| 271 | |
| 272 | int64_t total_bytes = 0; |
| 273 | |
| 274 | // Loop through frames, and calculate total bytes |
| 275 | std::deque<int64_t>::reverse_iterator itr; |
| 276 | for(itr = frame_numbers.rbegin(); itr != frame_numbers.rend(); ++itr) |
| 277 | total_bytes += frame_size_bytes; |
| 278 | |
| 279 | return total_bytes; |
| 280 | } |
| 281 | |
| 282 | // Remove a specific frame |
| 283 | void CacheDisk::Remove(int64_t frame_number) |
nothing calls this directly
no outgoing calls
no test coverage detected