From c5d0bc552121bf781fc50b23ca4521463d41e689 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 27 Jun 2011 06:29:47 +0000 Subject: [PATCH] small optimization --- Robust/src/Runtime/bamboo/multicoregcflush.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.34.1