rc/utils_cache.c: Allocate most of the memory required by uc_get_names() at once.
authorFlorian Forster <octo@collectd.org>
Sun, 7 Oct 2012 07:42:28 +0000 (09:42 +0200)
committerFlorian Forster <octo@collectd.org>
Sun, 7 Oct 2012 07:42:28 +0000 (09:42 +0200)
commitb9390e53e68f70cac2a6b5122214a86bfb51ae65
treeceb7a00540bb2d75a1a053782855f135cb30b2f5
parentb6009737c27e35990146d81c10b3b2b58053e5b7
rc/utils_cache.c: Allocate most of the memory required by uc_get_names() at once.

strdup() will still require additional memory, but no more memory movement like
required when doing realloc() a lot.

This fixes Github issue #148.
src/utils_cache.c