From 00f1f8a2498b5fe3030fed45ab0d20b96d77bb33 Mon Sep 17 00:00:00 2001 From: jjenista Date: Wed, 10 Nov 2010 22:36:04 +0000 Subject: [PATCH] back out pool alloc for now, fix it right when its clear we need it --- Robust/src/Runtime/oooJava/hashStructure.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Robust/src/Runtime/oooJava/hashStructure.c b/Robust/src/Runtime/oooJava/hashStructure.c index fd5c7261..d13a79ec 100644 --- a/Robust/src/Runtime/oooJava/hashStructure.c +++ b/Robust/src/Runtime/oooJava/hashStructure.c @@ -401,13 +401,20 @@ void rcr_RETIREHASHTABLE(HashStructure *T, SESEcommon *task, int key, BinItem_rc haveread=TRUE; } else if (ptr==val) { val=val->next; - poolfreeinto( T->memPoolRead, ptr ); + + // THE 3 POOLFREE's IN THIS FUNCTION ARE TOO EARLY: + // OTHER FUNCTIONS IN THIS COMPILATION UNIT LOCK THE BIN ELEMENT + // BUT MAY TOUCH THE STATUS FIELDS OF BIN ITEMS AFTER RELEASING + // THE LOCK, WE HAVE TO MAKE SOME CAREFUL CHANGES TO ALLOW THE + // POOLFREE's TO WORK! + + //poolfreeinto( T->memPoolRead, ptr ); } } else if (ptr->total==0) { //skip past retired item if (ptr==val) { val=val->next; - poolfreeinto( T->memPoolWrite, ptr ); + //poolfreeinto( T->memPoolWrite, ptr ); } } else { //write bin case @@ -419,7 +426,7 @@ void rcr_RETIREHASHTABLE(HashStructure *T, SESEcommon *task, int key, BinItem_rc ptr->status=READY; if(((INTPTR)wptr->task)&PARENTBIN) { val=val->next; - poolfreeinto( T->memPoolWrite, ptr ); + //poolfreeinto( T->memPoolWrite, ptr ); } else break; } -- 2.34.1