From b62d7dc1b4d1ab8efab40d0fc1465fb0eac28941 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sat, 14 Mar 2009 01:42:16 +0000 Subject: [PATCH] align everything to 8 byte boundaries --- Robust/src/Runtime/DSTM/interface/gCollect.c | 2 ++ Robust/src/Runtime/DSTM/interface/objstr.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Robust/src/Runtime/DSTM/interface/gCollect.c b/Robust/src/Runtime/DSTM/interface/gCollect.c index 37cd1503..6e9d339e 100644 --- a/Robust/src/Runtime/DSTM/interface/gCollect.c +++ b/Robust/src/Runtime/DSTM/interface/gCollect.c @@ -42,6 +42,8 @@ objstr_t * getObjStr(unsigned int size) { void *prefetchobjstrAlloc(unsigned int size) { //try existing space in first two OS objstr_t *os=pNodeInfo.newptr; + if ((size&7)!=0) + size+=(8-(size&7)); if (size<=OSFREE(os)) { void *tmp=os->top; os->top=((char *)os->top)+size; diff --git a/Robust/src/Runtime/DSTM/interface/objstr.c b/Robust/src/Runtime/DSTM/interface/objstr.c index 173b069d..5b982268 100644 --- a/Robust/src/Runtime/DSTM/interface/objstr.c +++ b/Robust/src/Runtime/DSTM/interface/objstr.c @@ -31,6 +31,10 @@ void *objstrAlloc(objstr_t **osptr, unsigned int size) { void *tmp; int i=0; objstr_t *store=*osptr; + if ((size&7)!=0) { + size+=(8-(size&7)); + } + for(;i<3;i++) { if (OSFREE(store)>=size) { tmp=store->top; -- 2.34.1