-/* Copyright (c) 2012-2014, 2016-2017. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2012-2019. 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. */
-#include "xbt/mmalloc.h"
+#include "simgrid/Exception.hpp"
#include "xbt.h"
+#include "xbt/mmalloc.h"
+
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <sys/stat.h>
#include <unistd.h>
-#include <xbt/ex.hpp>
-
XBT_LOG_NEW_DEFAULT_CATEGORY(test,"this test");
-#define BUFFSIZE 204800
-#define TESTSIZE 100
+constexpr int BUFFSIZE = 204800;
+constexpr int TESTSIZE = 100;
+
#define size_of_block(i) (((i % 50)+1)* 100)
static void check_block(const void* s, int c, int n)
mfree(heapA, pointers[i]);
try {
mfree(heapA, pointers[i]);
- } catch(xbt_ex& e) {
+ } catch (const xbt_ex&) {
gotit = true;
}
if (not gotit)
bool gotit = false;
try {
mfree(heapA, pointers[i]);
- } catch(xbt_ex& e) {
+ } catch (const xbt_ex&) {
gotit = true;
}
if (not gotit)