Camel string pool improvements.
authorMatthew Barnes <mbarnes@redhat.com>
Sun, 24 Jun 2012 21:28:06 +0000 (17:28 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Sun, 24 Jun 2012 23:09:01 +0000 (19:09 -0400)
commitc57820537cb97f36c28aa880cd41d29a1b87b0c2
tree81e500c2d049c1c9091d937b72c8dc49bf75f2fb
parent357d235c1f040ec7b0099f215dd1a90077423af6
Camel string pool improvements.

Keep the pointer to the allocated string and the allocated string's
reference count together in a new StringPoolNode struct.  This way a
StringPoolNode can be used as both the key and value in a GHashTable,
allowing the table to save some memory.  Also use the slab allocator
for the fixed-size StringPoolNode instances.

Didn't do any real formal measurements for this so the actual reduction
in memory usage may be insignificant.  If nothing else the code is more
readable now, and manipulating reference counts is less awkward.
camel/camel-string-utils.c
camel/camel-string-utils.h