X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e6224ecd95ff7b6452fe9b2c088138877797542..a6b23c846948f7f89277f75e7c42f3942b31b8d3:/src/smpi/colls/reduce-flat-tree.c?ds=sidebyside diff --git a/src/smpi/colls/reduce-flat-tree.c b/src/smpi/colls/reduce-flat-tree.c index 9241be1135..8a3140d5e0 100644 --- a/src/smpi/colls/reduce-flat-tree.c +++ b/src/smpi/colls/reduce-flat-tree.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. 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 "colls_private.h" //#include @@ -29,7 +35,7 @@ smpi_coll_tuned_reduce_flat_tree(void *sbuf, void *rbuf, int count, messages. */ if (size > 1) - origin = (char *) xbt_malloc(count * extent); + origin = (char *) smpi_get_tmp_recvbuffer(count * extent); /* Initialize the receive buffer. */ @@ -55,7 +61,7 @@ smpi_coll_tuned_reduce_flat_tree(void *sbuf, void *rbuf, int count, } if (origin) - free(origin); + smpi_free_tmp_buffer(origin); /* All done */ return 0;