Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove/cleanup/fix #include
[simgrid.git] / src / mc / RegionSnapshot.cpp
index 8a8c370..7e96951 100644 (file)
@@ -4,6 +4,8 @@
 /* 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 <cstdlib>
+
 #include <sys/mman.h>
 
 #include "mc/mc.h"
@@ -41,7 +43,7 @@ void data_deleter::operator()(void* p) const
 {
   switch(type_) {
   case Free:
-    free(p);
+    std::free(p);
     break;
   case Munmap:
     munmap(p, size_);
@@ -55,7 +57,7 @@ RegionSnapshot dense_region(
 {
   simgrid::mc::RegionSnapshot::flat_data_ptr data;
   if (!_sg_mc_ksm)
-    data = simgrid::mc::RegionSnapshot::flat_data_ptr((char*) malloc(size));
+    data = simgrid::mc::RegionSnapshot::flat_data_ptr((char*) std::malloc(size));
   else {
     char* ptr = (char*) mmap(nullptr, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, -1, 0);
     if (ptr == MAP_FAILED)