From 33c0c3fea78eea3645f10f8f9e4f6a71e731aa12 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 18 May 2014 20:32:23 +0800 Subject: [PATCH] Adjust node struct field ordering (for memory alignment) --- include/r3.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/r3.h b/include/r3.h index dc64d61..009486c 100644 --- a/include/r3.h +++ b/include/r3.h @@ -29,30 +29,28 @@ typedef struct _route route; struct _node { edge ** edges; + route ** routes; int edge_len; int edge_cap; - - route ** routes; int route_len; int route_cap; - + int endpoint; /** compile-time variables here.... **/ /* the combined regexp pattern string from pattern_tokens */ char * combined_pattern; int combined_pattern_len; - pcre * pcre_pattern; - pcre_extra * pcre_extra; int ov_cnt; int * ov; + pcre * pcre_pattern; + pcre_extra * pcre_extra; /** * the pointer of route data */ void * data; - int endpoint; }; struct _edge {