From: markls Date: Sun, 2 Sep 2007 12:29:28 +0000 (+0000) Subject: requests were not being makred uncompleted before being recycled by mallocator. X-Git-Tag: v3.3~1227 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/68d2b132184a5c50c3499257cb20e813fafdc125?ds=sidebyside requests were not being makred uncompleted before being recycled by mallocator. A minor bug that caused some confusion; fixed now. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4133 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/sample/second.c b/src/smpi/sample/second.c index d78aeac026..5c1d39f15e 100644 --- a/src/smpi/sample/second.c +++ b/src/smpi/sample/second.c @@ -13,6 +13,7 @@ #include #include + main(int argc, char *argv[]) { const int tag = 42; /* Message tag */ int id, ntasks, source_id, dest_id, err, i; diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 64a4b315a6..24d7974202 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -33,6 +33,10 @@ void smpi_request_free(void *pointer) void smpi_request_reset(void *pointer) { + smpi_mpi_request_t request = pointer; + + request->completed = 0; + return; } diff --git a/src/smpi/smpi_receiver.c b/src/smpi/smpi_receiver.c index 4acf7a1fec..bd1d1d95f7 100644 --- a/src/smpi/smpi_receiver.c +++ b/src/smpi/smpi_receiver.c @@ -83,12 +83,10 @@ stopsearch: } else { SIMIX_mutex_lock(request->mutex); - memcpy(request->buf, message->buf, request->datatype->size * request->count); request->src = message->src; request->completed = 1; SIMIX_cond_broadcast(request->cond); - SIMIX_mutex_unlock(request->mutex); xbt_free(message->buf);