| 59 | } |
| 60 | |
| 61 | void SaveStateSaving::processArea(Area* area) |
| 62 | { |
| 63 | /* Save the position of the first area page in the pages file */ |
| 64 | area->page_offset = lseek(pfd, 0, SEEK_CUR); |
| 65 | MYASSERT(area->page_offset != -1) |
| 66 | |
| 67 | /* Write the area struct */ |
| 68 | if (Global::shared_config.savestate_settings & SharedConfig::SS_PRESENT) |
| 69 | area->uncommitted = area->isUncommitted(spmfd); |
| 70 | else |
| 71 | area->uncommitted = false; |
| 72 | |
| 73 | /* Fill fd of deleted files, which may be used when loading the savestate */ |
| 74 | area->fillDeletedFd(); |
| 75 | |
| 76 | // if (Global::shared_config.logging_level >= LL_DEBUG) { |
| 77 | // if (area->skip || area->uncommitted) |
| 78 | // area->hash = 0; |
| 79 | // else |
| 80 | // area->hash = XXH3_64bits(area->addr, area->size); |
| 81 | // } |
| 82 | |
| 83 | Utils::writeAll(pmfd, area, sizeof(*area)); |
| 84 | |
| 85 | LZ4_resetStream_fast(&lz4s); |
| 86 | } |
| 87 | |
| 88 | void SaveStateSaving::savePageFlag(char flag) |
| 89 | { |
no test coverage detected