Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into mc-process
[simgrid.git] / src / mc / mc_page_snapshot.cpp
index 16c8508..72997ba 100644 (file)
@@ -1,3 +1,10 @@
+/* MC interface: definitions that non-MC modules must see, but not the user */
+
+/* Copyright (c) 2014-2015. The SimGrid Team.  All rights reserved.         */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include <unistd.h> // pread, pwrite
 
 #include "mc_page_store.h"
@@ -208,7 +215,7 @@ mc_mem_region_t mc_region_new_sparse(mc_region_type_t region_type,
   uint64_t* pagemap = NULL;
   if (_sg_mc_soft_dirty && mc_model_checker->parent_snapshot &&
       MC_process_is_self(process)) {
-      pagemap = (uint64_t*) mmalloc_no_memset(mc_heap, sizeof(uint64_t) * page_count);
+      pagemap = (uint64_t*) malloc_no_memset(sizeof(uint64_t) * page_count);
       mc_read_pagemap(pagemap, mc_page_number(NULL, permanent_addr), page_count);
   }
 
@@ -237,7 +244,7 @@ void mc_region_restore_sparse(mc_process_t process, mc_mem_region_t reg, mc_mem_
   // Read soft-dirty bits if necessary in order to know which pages have changed:
   if (_sg_mc_soft_dirty && mc_model_checker->parent_snapshot
       && MC_process_is_self(process)) {
-    pagemap = (uint64_t*) mmalloc_no_memset(mc_heap, sizeof(uint64_t) * page_count);
+    pagemap = (uint64_t*) malloc_no_memset(sizeof(uint64_t) * page_count);
     mc_read_pagemap(pagemap, mc_page_number(NULL, reg->permanent_addr), page_count);
   }