Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
adding sleep sets to reduction techniques
[simgrid.git] / teshsuite / xbt / mmalloc / mmalloc_test.cpp
index 76196b812c3dc9f62b6315b9caa54221861afa5a..5c6e4159e4b13f8d3a7eefa97ced9cf7afbe7c54 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -70,28 +70,9 @@ int main(int argc, char**argv)
     pointers[i] = mmalloc(heapA, size);
   }
 
-  XBT_INFO("free all blocks (each one twice, to check that double free are correctly caught)");
-  for (i = 0; i < TESTSIZE; i++) {
-    bool gotit = false;
+  XBT_INFO("free all blocks");
+  for (i = 0; i < TESTSIZE; i++)
     mfree(heapA, pointers[i]);
-    try {
-      mfree(heapA, pointers[i]);
-    } catch (const simgrid::Exception&) {
-      gotit = true;
-    }
-    xbt_assert(gotit, "FAIL: A double-free went undetected (for size:%d)", size_of_block(i));
-  }
-
-  XBT_INFO("free again all blocks (to really check that double free are correctly caught)");
-  for (i = 0; i < TESTSIZE; i++) {
-    bool gotit = false;
-    try {
-      mfree(heapA, pointers[i]);
-    } catch (const simgrid::Exception&) {
-      gotit = true;
-    }
-    xbt_assert(gotit, "FAIL: A double-free went undetected (for size:%d)", size_of_block(i));
-  }
 
   XBT_INFO("Let's try different codepaths for mrealloc");
   for (i = 0; i < TESTSIZE; i++) {