Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Forgot to decrease the page refcounts when freeing a snapshot
[simgrid.git] / src / mc / mc_checkpoint.c
index abb2dee..202a2f1 100644 (file)
@@ -64,6 +64,9 @@ static void MC_region_destroy(mc_mem_region_t reg)
 {
   //munmap(reg->data, reg->size);
   xbt_free(reg->data);
+  if (reg->page_numbers) {
+    mc_free_page_snapshot_region(reg->page_numbers, mc_page_count(reg->size));
+  }
   xbt_free(reg);
 }