[icinga-checkins] icinga.org: icinga-core/mfriedrich/workers: libicinga: add possibility to avoid multiple allo()/free() calls #2955

git at icinga.org git at icinga.org
Sun Aug 5 23:32:12 CEST 2012


Module: icinga-core
Branch: mfriedrich/workers
Commit: 0fe097c440c267eca9a33526eca8a6089629b317
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=0fe097c440c267eca9a33526eca8a6089629b317

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sun Aug  5 15:00:40 2012 +0200

libicinga: add possibility to avoid multiple allo()/free() calls #2955

it's rather simple to allow callers to provide a pointer to their own
previously allocated key/value vector, and this allows them to avoid a
large amount of needless memory munging, so it proves to be quite useful
in performance improvements too.

refs #2955

---

 base/workers.c   |   16 ++++-----
 lib/kvvec.c      |  101 +++++++++++++++++++++++++++++++++++++++---------------
 lib/kvvec.h      |   34 +++++++++++++++---
 lib/test-kvvec.c |    2 +-
 lib/worker.c     |   52 +++++++++++++--------------
 lib/wproc.c      |    2 +-
 6 files changed, 136 insertions(+), 71 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=0fe097c440c267eca9a33526eca8a6089629b317




More information about the icinga-checkins mailing list