A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix tracing debug mode (and please sonar)
[simgrid.git]
/
src
/
mc
/
RegionSnapshot.cpp
diff --git
a/src/mc/RegionSnapshot.cpp
b/src/mc/RegionSnapshot.cpp
index
104e8ff
..
a659f9a
100644
(file)
--- a/
src/mc/RegionSnapshot.cpp
+++ b/
src/mc/RegionSnapshot.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-201
5
. The SimGrid Team.
+/* Copyright (c) 2007-201
8
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-12,7
+12,8
@@
#endif
#include "mc/mc.h"
#endif
#include "mc/mc.h"
-#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_config.hpp"
+#include "src/mc/mc_snapshot.hpp"
#include "src/mc/ChunkedData.hpp"
#include "src/mc/RegionSnapshot.hpp"
#include "src/mc/ChunkedData.hpp"
#include "src/mc/RegionSnapshot.hpp"
@@
-42,7
+43,7
@@
Buffer::Buffer(std::size_t size, Type type) : size_(size), type_(type)
{
switch(type_) {
case Type::Malloc:
{
switch(type_) {
case Type::Malloc:
- data_ = ::
malloc
(size_);
+ data_ = ::
operator new
(size_);
break;
case Type::Mmap:
data_ = ::mmap(nullptr, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, -1, 0);
break;
case Type::Mmap:
data_ = ::mmap(nullptr, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, -1, 0);
@@
-62,7
+63,7
@@
void Buffer::clear() noexcept
{
switch(type_) {
case Type::Malloc:
{
switch(type_) {
case Type::Malloc:
-
std::fre
e(data_);
+
::operator delet
e(data_);
break;
case Type::Mmap:
if (munmap(data_, size_) != 0)
break;
case Type::Mmap:
if (munmap(data_, size_) != 0)
@@
-81,8
+82,8
@@
RegionSnapshot dense_region(
void *start_addr, void* permanent_addr, size_t size)
{
// When KSM support is enables, we allocate memory using mmap:
void *start_addr, void* permanent_addr, size_t size)
{
// When KSM support is enables, we allocate memory using mmap:
- // * we don't want to advise bits of the heap as mergable
;
- // * mmap gives data aligned on page boundaries which is merge friendly
.
+ // * we don't want to advise bits of the heap as mergable
+ // * mmap gives data aligned on page boundaries which is merge friendly
simgrid::mc::Buffer data;
if (_sg_mc_ksm)
data = Buffer::mmap(size);
simgrid::mc::Buffer data;
if (_sg_mc_ksm)
data = Buffer::mmap(size);
@@
-137,8
+138,8
@@
RegionSnapshot sparse_region(RegionType region_type,
"Not at the beginning of a page");
size_t page_count = simgrid::mc::mmu::chunkCount(size);
"Not at the beginning of a page");
size_t page_count = simgrid::mc::mmu::chunkCount(size);
- simgrid::mc::ChunkedData page_data(
-
mc_model_checker->page_store(), *process, permanent_addr,
page_count);
+ simgrid::mc::ChunkedData page_data(
mc_model_checker->page_store(), *process, RemotePtr<void>(permanent_addr),
+
page_count);
simgrid::mc::RegionSnapshot region(
region_type, start_addr, permanent_addr, size);
simgrid::mc::RegionSnapshot region(
region_type, start_addr, permanent_addr, size);