From eb39a99b2c4d80bf158942b769221d3271f99016 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 26 Nov 2003 12:22:22 +0000 Subject: Speed updates create generic macros for allocating/freeing structures. remove one more slow GMemChunk and replace it with a simple linked list ~4% speed improvement in my tests. the allocated data is never freed. this may be a problem if ethereal is ever supported on a platform lacking resource tracking but makes the implementation faster and simpler. svn path=/trunk/; revision=9095 --- epan/proto.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'epan/proto.h') diff --git a/epan/proto.h b/epan/proto.h index ac00237165..671e94abed 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -1,7 +1,7 @@ /* proto.h * Definitions for protocol display * - * $Id: proto.h,v 1.47 2003/11/25 14:07:44 sahlberg Exp $ + * $Id: proto.h,v 1.48 2003/11/26 12:22:22 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -105,7 +105,7 @@ typedef struct hf_register_info { typedef struct _item_label_t { struct _item_label_t *next; - char *representation; + char representation[ITEM_LABEL_LENGTH]; } item_label_t; /* Contains the field information for the proto_item. */ @@ -136,9 +136,10 @@ typedef struct { /* Each GNode (proto_tree, proto_item) points to one of * these. */ -typedef struct { - field_info *finfo; - tree_data_t *tree_data; +typedef struct _proto_node { + struct _proto_node *next; + field_info *finfo; + tree_data_t *tree_data; } proto_node; typedef GNode proto_tree; -- cgit v1.2.1