Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix unitialized variable
[simgrid.git] / src / mc / mc_process.h
index cf5aefb..4aadece 100644 (file)
@@ -11,7 +11,6 @@
 #include <sys/types.h>
 
 #include "simgrid_config.h"
-
 #include <sys/types.h>
 
 #include <xbt/mmalloc.h>
@@ -20,6 +19,7 @@
 #include "xbt/mmalloc/mmprivate.h"
 #endif
 
+#include <simgrid/simix.h>
 #include "simix/popping_private.h"
 #include "simix/smx_private.h"
 
@@ -192,8 +192,6 @@ char* MC_process_read_string(mc_process_t, void* address);
 
 static inline xbt_mheap_t MC_process_get_heap(mc_process_t process)
 {
-  if (MC_process_is_self(process))
-    return std_heap;
   if (!(process->cache_flags & MC_PROCESS_CACHE_FLAG_HEAP))
     MC_process_refresh_heap(process);
   return process->heap;
@@ -201,8 +199,6 @@ static inline xbt_mheap_t MC_process_get_heap(mc_process_t process)
 
 static inline malloc_info* MC_process_get_malloc_info(mc_process_t process)
 {
-  if (MC_process_is_self(process))
-    return std_heap->heapinfo;
   if (!(process->cache_flags & MC_PROCESS_CACHE_FLAG_MALLOC_INFO))
     MC_process_refresh_malloc_info(process);
   return process->heap_info;
@@ -212,6 +208,8 @@ static inline malloc_info* MC_process_get_malloc_info(mc_process_t process)
  */
 dw_variable_t MC_process_find_variable_by_name(mc_process_t process, const char* name);
 
+void MC_invalidate_cache(void);
+
 SG_END_DECL()
 
 #endif