From fddaeb1dc85c6578567c33d76f65e0b9d9b25f4e Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 29 Sep 2004 15:59:25 +0000 Subject: [PATCH] reduced memory consumption with large channel counts --- src/ca/catime.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ca/catime.c b/src/ca/catime.c index d5e056720..ddac38218 100644 --- a/src/ca/catime.c +++ b/src/ca/catime.c @@ -49,7 +49,12 @@ typedef struct testItem { char name[40]; int type; int count; - union db_access_val val; + union { + dbr_double_t doubleval; + dbr_float_t fltval; + dbr_short_t intval; + dbr_string_t strval; + } val; } ti; typedef void tf ( ti *pItems, unsigned iterations, unsigned *pInlineIter ); @@ -554,7 +559,7 @@ int catime ( char *channelName, unsigned channelCount, enum appendNumberFlag app test ( pItemList, channelCount ); for ( i = 0; i < channelCount; i++ ) { - pItemList[i].val.fltval = 0.0f; + pItemList[i].val.doubleval = 0.0; pItemList[i].type = DBR_DOUBLE; } printf ( "double test\n" );