int v3_chkpt_save(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * buf) {
- struct v3_chkpt * chkpt = ctx->chkpt;
+ struct v3_chkpt * chkpt;
int rc;
if (!ctx) {
return -1;
}
+ chkpt = ctx->chkpt;
+
if (chkpt->current_ctx != ctx) {
PrintError(VM_NONE, VCORE_NONE, "Attempt to save on context that is not the current context for the store\n");
return -1;
int v3_chkpt_load(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * buf) {
- struct v3_chkpt * chkpt = ctx->chkpt;
+ struct v3_chkpt * chkpt;
int rc;
if (!ctx) {
PrintError(VM_NONE, VCORE_NONE, "Attempt to load tag %s from null context\n",tag);
return -1;
}
+
+ chkpt = ctx->chkpt;
if (chkpt->current_ctx != ctx) {
PrintError(VM_NONE, VCORE_NONE, "Attempt to load from context that is not the current context for the store\n");
int iter = 0;
bool last_modpage_iteration=false;
struct v3_bitmap modified_pages_to_send;
- uint64_t start_time;
+ uint64_t start_time=0;
uint64_t stop_time;
int num_mod_pages=0;
struct mem_migration_state *mm_state;