Gets the maximum bytes value
| 138 | |
| 139 | // Gets the maximum bytes value |
| 140 | int64_t CacheMemory::GetBytes() |
| 141 | { |
| 142 | // Create a scoped lock, to protect the cache from multiple threads |
| 143 | const std::lock_guard<std::recursive_mutex> lock(*cacheMutex); |
| 144 | |
| 145 | int64_t total_bytes = 0; |
| 146 | |
| 147 | // Loop through frames, and calculate total bytes |
| 148 | std::deque<int64_t>::reverse_iterator itr; |
| 149 | for(itr = frame_numbers.rbegin(); itr != frame_numbers.rend(); ++itr) |
| 150 | { |
| 151 | total_bytes += frames[*itr]->GetBytes(); |
| 152 | } |
| 153 | |
| 154 | return total_bytes; |
| 155 | } |
| 156 | |
| 157 | // Remove a specific frame |
| 158 | void CacheMemory::Remove(int64_t frame_number) |
nothing calls this directly
no outgoing calls
no test coverage detected