Like getPageFlag(), but assumes you're going through the addresses * sequentially. This means it can skip some checks and be a little faster. */
| 191 | /* Like getPageFlag(), but assumes you're going through the addresses |
| 192 | * sequentially. This means it can skip some checks and be a little faster. */ |
| 193 | char SaveStateLoading::getNextPageFlag() |
| 194 | { |
| 195 | char flag = nextFlag(); |
| 196 | if (flag == Area::FULL_PAGE) { |
| 197 | next_pfd_offset += 4096; |
| 198 | } |
| 199 | else if (flag == Area::COMPRESSED_PAGE) { |
| 200 | lseek(pfd, next_pfd_offset, SEEK_SET); |
| 201 | Utils::readAll(pfd, &compressed_length, sizeof(int)); |
| 202 | if (!validateCompressedLength()) { |
| 203 | current_flag = Area::NONE; |
| 204 | return Area::NONE; |
| 205 | } |
| 206 | next_pfd_offset += sizeof(int) + compressed_length; |
| 207 | } |
| 208 | current_addr += 4096; |
| 209 | return flag; |
| 210 | } |
| 211 | |
| 212 | void SaveStateLoading::finishLoad() |
| 213 | { |
no outgoing calls
no test coverage detected