From 7decae7172477521334d6eedc24efb034f525db2 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Sat, 8 Apr 2006 00:05:09 +0000 Subject: [PATCH] All tests that pass with LOG_TO_FILE now pass with LOG_TO_MEMORY, but LOG_TO_MEMORY is slow, and seems to be killing malloc's performance for some reason. (linearHashNTA spends many seconds in free() between unit tests...) --- src/lladd/logger/logger2.c | 2 +- src/lladd/transactional2.c | 4 +--- test/lladd/check_linearHashNTA.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lladd/logger/logger2.c b/src/lladd/logger/logger2.c index 9cb4db0..f5f699e 100644 --- a/src/lladd/logger/logger2.c +++ b/src/lladd/logger/logger2.c @@ -51,7 +51,7 @@ terms specified in this license. #include #include -int loggerType = LOG_TO_FILE; //MEMORY; +int loggerType = LOG_TO_MEMORY; void genericLogWrite(LogEntry * e) { assert(loggerType != -1); // Otherwise, we haven't been initialized. diff --git a/src/lladd/transactional2.c b/src/lladd/transactional2.c index 7b2b6ac..10c01ef 100644 --- a/src/lladd/transactional2.c +++ b/src/lladd/transactional2.c @@ -94,7 +94,7 @@ void setupOperationsTable() { int Tinit() { pthread_mutex_init(&transactional_2_mutex, NULL); - + numActiveXactions = 0; setupOperationsTable(); bufInit(); @@ -144,8 +144,6 @@ int Tbegin() { xidCount_tmp = xidCount; - assert( i < MAX_TRANSACTIONS ); - XactionTable[index].xid = PENDING_XTABLE_XID; pthread_mutex_unlock(&transactional_2_mutex); diff --git a/test/lladd/check_linearHashNTA.c b/test/lladd/check_linearHashNTA.c index 1019a49..e6f0228 100644 --- a/test/lladd/check_linearHashNTA.c +++ b/test/lladd/check_linearHashNTA.c @@ -81,7 +81,7 @@ START_TEST(linearHashNTAtest) assert(val2->size == val2->slot * NUM_ENTRIES); free(val2); } - + if(1) { return; } Tcommit(xid); printf("\n"); fflush(stdout);