-/* Copyright (c) 2013-2017. The SimGrid Team.
+/* Copyright (c) 2013-2019. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
else {
int creq = 0;
- MPI_Request* sreq = NULL;
-
- sreq = (MPI_Request*) calloc( max_outstanding_reqs,
- sizeof(MPI_Request ) );
+ MPI_Request* sreq = new (std::nothrow) MPI_Request[max_outstanding_reqs];
if (NULL == sreq) { line = __LINE__; ret = -1; goto error_hndl; }
/* post first group of requests */
MPI_STATUSES_IGNORE );
/* free requests */
- free(sreq);
+ delete[] sreq;
}
}
- free(tree);
+ ompi_coll_tuned_topo_destroy_tree(&tree);
return MPI_SUCCESS;
error_hndl: /* error handler */