+static void MC_region_destroy(mc_mem_region_t reg)
+{
+ xbt_free(reg->data);
+ xbt_free(reg);
+}
+
+void MC_free_snapshot(mc_snapshot_t snapshot){
+ unsigned int i;
+ for(i=0; i < NB_REGIONS; i++)
+ MC_region_destroy(snapshot->regions[i]);
+
+ xbt_free(snapshot->stack_sizes);
+ xbt_dynar_free(&(snapshot->stacks));
+ xbt_dynar_free(&(snapshot->to_ignore));
+ xbt_free(snapshot);
+}
+