From 094ae94c861fe4f0ab36bfb35a7fb3a101fd667a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sun, 3 Nov 2013 10:43:44 +0100 Subject: remove no longer needed vars from batch structure --- runtime/batch.h | 12 +----------- runtime/queue.c | 4 ---- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/runtime/batch.h b/runtime/batch.h index 75eecdb1..fac0158e 100644 --- a/runtime/batch.h +++ b/runtime/batch.h @@ -46,16 +46,6 @@ typedef unsigned char batch_state_t; */ struct batch_obj_s { msg_t *pMsg; - /* work variables for action processing; these are reused for each action (or block of - * actions) - */ - /* following are caches to save allocs if not absolutely necessary */ - uchar *staticActStrings[CONF_OMOD_NUMSTRINGS_MAXSIZE]; /**< for strings */ - /* a cache to save malloc(), if not absolutely necessary */ - void *staticActParams[CONF_OMOD_NUMSTRINGS_MAXSIZE]; /**< for anything else */ - size_t staticLenStrings[CONF_OMOD_NUMSTRINGS_MAXSIZE]; - /* and the same for the message length (if used) */ - /* end action work variables */ }; /* the batch @@ -151,7 +141,7 @@ batchFree(batch_t *pBatch) { /* staticActParams MUST be freed immediately (if required), * so we do not need to do that! */ - free(pBatch->pElem[i].staticActStrings[j]); + //TODO: do this in wti! free(pBatch->pElem[i].staticActStrings[j]); } } free(pBatch->pElem); diff --git a/runtime/queue.c b/runtime/queue.c index 968c016e..93661e41 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -987,10 +987,6 @@ static rsRetVal qAddDirect(qqueue_t *pThis, msg_t* pMsg, wti_t *pWti) singleBatch.eltState = &batchState; singleBatch.active = &active; iRet = pThis->pConsumer(pThis->pAction, &singleBatch, pWti, &pThis->bShutdownImmediate); - /* delete the batch string params: TODO: create its own "class" for this */ - for(i = 0 ; i < CONF_OMOD_NUMSTRINGS_MAXSIZE ; ++i) { - free(batchObj.staticActStrings[i]); - } msgDestruct(&pMsg); RETiRet; -- cgit v1.2.3