summaryrefslogtreecommitdiffstats
path: root/runtime/msg.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-23 11:22:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-23 11:22:07 +0200
commitd798f5b66f4ae699f352b6c40abd07495eff8f94 (patch)
treea5b7aa9e90a6639f2b86a3d7f3a5e13615055907 /runtime/msg.h
parentce5869f7c41c8db943d8cbe804b69af40d43e2e6 (diff)
downloadrsyslog-d798f5b66f4ae699f352b6c40abd07495eff8f94.tar.gz
rsyslog-d798f5b66f4ae699f352b6c40abd07495eff8f94.tar.xz
rsyslog-d798f5b66f4ae699f352b6c40abd07495eff8f94.zip
some more optimizations
- done malloc() instead of calloc() for msg_t, as we have large space which needs not be initialized - shrunk syslogTime structure in the hope to get better cache and write performance (non-aligned data should not hurt much here)
Diffstat (limited to 'runtime/msg.h')
-rw-r--r--runtime/msg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/msg.h b/runtime/msg.h
index 0f9bd95e..9113882a 100644
--- a/runtime/msg.h
+++ b/runtime/msg.h
@@ -51,6 +51,11 @@
* will be decremented. If it is 1, however, the object is actually
* destroyed. To make this work, it is vital that MsgAddRef() is
* called each time a "copy" is stored somewhere.
+ *
+ * WARNING: this structure is not calloc()ed, so be careful when
+ * adding new fields. You need to initialize them in
+ * msgBaseConstruct(). That function header comment also describes
+ * why this is the case.
*/
struct msg {
BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */