Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics: use 's_xbt_mheap_t' instead of 'struct mdesc'.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Dec 2019 13:44:26 +0000 (14:44 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Dec 2019 13:45:15 +0000 (14:45 +0100)
src/mc/compare.cpp
src/mc/remote/Client.cpp
src/mc/sosp/Snapshot.cpp
src/mc/sosp/Snapshot.hpp

index d23054c..a93c6d1 100644 (file)
@@ -1227,9 +1227,9 @@ bool snapshot_equal(const Snapshot* s1, const Snapshot* s2)
   }
 
   /* Init heap information used in heap comparison algorithm */
-  xbt_mheap_t heap1 = static_cast<xbt_mheap_t>(s1->read_bytes(alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
+  xbt_mheap_t heap1 = static_cast<xbt_mheap_t>(s1->read_bytes(alloca(sizeof(s_xbt_mheap_t)), sizeof(s_xbt_mheap_t),
                                                               remote(process.heap_address), ReadOptions::lazy()));
-  xbt_mheap_t heap2 = static_cast<xbt_mheap_t>(s2->read_bytes(alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
+  xbt_mheap_t heap2 = static_cast<xbt_mheap_t>(s2->read_bytes(alloca(sizeof(s_xbt_mheap_t)), sizeof(s_xbt_mheap_t),
                                                               remote(process.heap_address), ReadOptions::lazy()));
   if (state_comparator.initHeapInformation(heap1, heap2, s1->to_ignore_, s2->to_ignore_) == -1) {
     XBT_VERB("(%d - %d) Different heap information", s1->num_state_, s2->num_state_);
index 8d7b915..a1c9242 100644 (file)
@@ -183,7 +183,7 @@ void Client::ignore_memory(void* addr, std::size_t size)
 
 void Client::ignore_heap(void* address, std::size_t size)
 {
-  const mdesc* heap = mmalloc_get_current_heap();
+  const s_xbt_mheap_t* heap = mmalloc_get_current_heap();
 
   s_mc_message_ignore_heap_t message;
   message.type    = MC_MESSAGE_IGNORE_HEAP;
@@ -227,7 +227,7 @@ void Client::declare_symbol(const char* name, int* value)
 
 void Client::declare_stack(void* stack, size_t size, ucontext_t* context)
 {
-  const mdesc* heap = mmalloc_get_current_heap();
+  const s_xbt_mheap_t* heap = mmalloc_get_current_heap();
 
   s_stack_region_t region;
   memset(&region, 0, sizeof(region));
index 047ae88..fb8e06f 100644 (file)
@@ -23,7 +23,7 @@ void Snapshot::snapshot_regions(RemoteClient* process)
   for (auto const& object_info : process->object_infos)
     add_region(RegionType::Data, object_info.get(), object_info->start_rw, object_info->end_rw - object_info->start_rw);
 
-  const mdesc* heap = process->get_heap();
+  const s_xbt_mheap_t* heap = process->get_heap();
   void* start_heap = heap->base;
   void* end_heap   = heap->breakval;
 
index 92ea945..11aee6d 100644 (file)
@@ -66,7 +66,7 @@ public:
   /* Regular use */
   bool on_heap(const void* address) const
   {
-    const mdesc* heap = process()->get_heap();
+    const s_xbt_mheap_t* heap = process()->get_heap();
     return address >= heap->heapbase && address < heap->breakval;
   }