align everything to 8 byte boundaries
authorbdemsky <bdemsky>
Sat, 14 Mar 2009 01:42:16 +0000 (01:42 +0000)
committerbdemsky <bdemsky>
Sat, 14 Mar 2009 01:42:16 +0000 (01:42 +0000)
Robust/src/Runtime/DSTM/interface/gCollect.c
Robust/src/Runtime/DSTM/interface/objstr.c

index 37cd1503892f22f1ae41ef042b8cf372ab367de4..6e9d339e204ff9f0f9005d4c1f4306cada81ca56 100644 (file)
@@ -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;
index 173b069d0d5aa4ab175a4ef4f9e64f3ab2c3d88b..5b982268fe5b95f4379176723e078d0c55f14560 100644 (file)
@@ -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;