optimization for local objects
authorbdemsky <bdemsky>
Fri, 30 Jan 2009 20:48:53 +0000 (20:48 +0000)
committerbdemsky <bdemsky>
Fri, 30 Jan 2009 20:48:53 +0000 (20:48 +0000)
Robust/src/Runtime/DSTM/interface/localobjects.c

index 1c2ee0067f4f7e1220be68700ae478990fa407c0..ce24607f3f1ee4770c4727bd47f1c9d2bff0399a 100644 (file)
@@ -4,7 +4,9 @@
 void REVERT_OBJ(struct ___Object___ * obj) {
   int type=((int *)obj)[0];
   struct ___Object___ * copyobj=obj->___localcopy___;
-  if (type<NUMCLASSES) {
+  if(((int)copyobj)==1) {
+    obj->___localcopy___=NULL;
+  } else if (type<NUMCLASSES) {
     /* We have a normal object */
     int size=classsize[type];
     memcpy(obj, copyobj, size);