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
Various cleanups in the generation of simgrid.jar
[simgrid.git]
/
src
/
mc
/
ModelChecker.cpp
diff --git
a/src/mc/ModelChecker.cpp
b/src/mc/ModelChecker.cpp
index
061ca74
..
2e41784
100644
(file)
--- a/
src/mc/ModelChecker.cpp
+++ b/
src/mc/ModelChecker.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2008-201
4
. The SimGrid Team.
+/* Copyright (c) 2008-201
5
. 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
@@
-7,27
+7,22
@@
#include <cassert>
#include "ModelChecker.hpp"
#include <cassert>
#include "ModelChecker.hpp"
-#include "
mc_page_store.h
"
+#include "
PageStore.hpp
"
::simgrid::mc::ModelChecker* mc_model_checker = NULL;
namespace simgrid {
namespace mc {
::simgrid::mc::ModelChecker* mc_model_checker = NULL;
namespace simgrid {
namespace mc {
-ModelChecker::ModelChecker(pid_t pid, int socket)
+ModelChecker::ModelChecker(pid_t pid, int socket) :
+ hostnames_(xbt_dict_new()),
+ page_store_(500),
+ process_(pid, socket)
{
{
- this->page_store_ = mc_pages_store_new();
- this->fd_clear_refs_ = -1;
- this->hostnames_ = xbt_dict_new();
- MC_process_init(&this->process(), pid, socket);
}
ModelChecker::~ModelChecker()
{
}
ModelChecker::~ModelChecker()
{
- mc_pages_store_delete(this->page_store_);
- if(this->record_)
- xbt_dynar_free(&this->record_);
- MC_process_clear(&this->process_);
xbt_dict_free(&this->hostnames_);
}
xbt_dict_free(&this->hostnames_);
}
@@
-36,11
+31,9
@@
const char* ModelChecker::get_host_name(const char* hostname)
// Lookup the host name in the dictionary (or create it):
xbt_dictelm_t elt = xbt_dict_get_elm_or_null(this->hostnames_, hostname);
if (!elt) {
// Lookup the host name in the dictionary (or create it):
xbt_dictelm_t elt = xbt_dict_get_elm_or_null(this->hostnames_, hostname);
if (!elt) {
- xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
xbt_dict_set(this->hostnames_, hostname, NULL, NULL);
elt = xbt_dict_get_elm_or_null(this->hostnames_, hostname);
assert(elt);
xbt_dict_set(this->hostnames_, hostname, NULL, NULL);
elt = xbt_dict_get_elm_or_null(this->hostnames_, hostname);
assert(elt);
- mmalloc_set_current_heap(heap);
}
return elt->key;
}
}
return elt->key;
}