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
[mc] Fix type of zero_buffer_size in mc_process.c
[simgrid.git]
/
src
/
mc
/
mc_process.cpp
diff --git
a/src/mc/mc_process.cpp
b/src/mc/mc_process.cpp
index
5dbbddd
..
a1a139e
100644
(file)
--- a/
src/mc/mc_process.cpp
+++ b/
src/mc/mc_process.cpp
@@
-81,7
+81,8
@@
void MC_process_init(mc_process_t process, pid_t pid, int sockfd)
MC_process_open_memory_file(process);
// Read std_heap (is a struct mdesc*):
MC_process_open_memory_file(process);
// Read std_heap (is a struct mdesc*):
- dw_variable_t std_heap_var = MC_process_find_variable_by_name(process, "std_heap");
+ dw_variable_t std_heap_var = MC_process_find_variable_by_name(process,
+ "__mmalloc_default_mdp");
if (!std_heap_var)
xbt_die("No heap information in the target process");
if(!std_heap_var->address)
if (!std_heap_var)
xbt_die("No heap information in the target process");
if(!std_heap_var->address)
@@
-154,7
+155,8
@@
void MC_process_clear(mc_process_t process)
void MC_process_refresh_heap(mc_process_t process)
{
void MC_process_refresh_heap(mc_process_t process)
{
- assert(!MC_process_is_self(process));
+ xbt_assert(mc_mode == MC_MODE_SERVER);
+ xbt_assert(!MC_process_is_self(process));
// Read/dereference/refresh the std_heap pointer:
if (!process->heap) {
process->heap = (struct mdesc*) malloc(sizeof(struct mdesc));
// Read/dereference/refresh the std_heap pointer:
if (!process->heap) {
process->heap = (struct mdesc*) malloc(sizeof(struct mdesc));
@@
-163,11
+165,13
@@
void MC_process_refresh_heap(mc_process_t process)
process->heap, process->heap_address, sizeof(struct mdesc),
MC_PROCESS_INDEX_DISABLED
);
process->heap, process->heap_address, sizeof(struct mdesc),
MC_PROCESS_INDEX_DISABLED
);
+ process->cache_flags |= MC_PROCESS_CACHE_FLAG_HEAP;
}
void MC_process_refresh_malloc_info(mc_process_t process)
{
}
void MC_process_refresh_malloc_info(mc_process_t process)
{
- assert(!MC_process_is_self(process));
+ xbt_assert(mc_mode == MC_MODE_SERVER);
+ xbt_assert(!MC_process_is_self(process));
if (!(process->cache_flags & MC_PROCESS_CACHE_FLAG_HEAP))
MC_process_refresh_heap(process);
// Refresh process->heapinfo:
if (!(process->cache_flags & MC_PROCESS_CACHE_FLAG_HEAP))
MC_process_refresh_heap(process);
// Refresh process->heapinfo:
@@
-178,6
+182,7
@@
void MC_process_refresh_malloc_info(mc_process_t process)
process->heap_info,
process->heap->heapinfo, malloc_info_bytesize,
MC_PROCESS_INDEX_DISABLED);
process->heap_info,
process->heap->heapinfo, malloc_info_bytesize,
MC_PROCESS_INDEX_DISABLED);
+ process->cache_flags |= MC_PROCESS_CACHE_FLAG_MALLOC_INFO;
}
#define SO_RE "\\.so[\\.0-9]*$"
}
#define SO_RE "\\.so[\\.0-9]*$"
@@
-587,7
+592,7
@@
unsigned long MC_process_read_dynar_length(mc_process_t process, const void* rem
static pthread_once_t zero_buffer_flag = PTHREAD_ONCE_INIT;
static const void* zero_buffer;
static pthread_once_t zero_buffer_flag = PTHREAD_ONCE_INIT;
static const void* zero_buffer;
-static const
in
t zero_buffer_size = 10 * 4096;
+static const
size_
t zero_buffer_size = 10 * 4096;
static void MC_zero_buffer_init(void)
{
static void MC_zero_buffer_init(void)
{