From: bdemsky Date: Mon, 27 Jun 2011 06:29:47 +0000 (+0000) Subject: small optimization X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c5d0bc552121bf781fc50b23ca4521463d41e689;p=IRC.git small optimization --- diff --git a/Robust/src/Runtime/bamboo/multicoregcflush.c b/Robust/src/Runtime/bamboo/multicoregcflush.c index 6d79bc7f..762d1d0f 100644 --- a/Robust/src/Runtime/bamboo/multicoregcflush.c +++ b/Robust/src/Runtime/bamboo/multicoregcflush.c @@ -217,7 +217,8 @@ void * updateblocks(struct moveHelper * orig, struct moveHelper * to) { /* Move the object */ if(origptr <= endtoptr) { memmove(dstptr, origptr, length); - } else { + } else if (origptr!=dstptr) { + //no need to copy if the source & dest are equal.... memcpy(dstptr, origptr, length); }