From d904fa6ae9df4c50e189d52996eca7206c5dfa33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 4 Jun 2009 20:42:31 +0000 Subject: [PATCH] * shrink default buffer size from 4K to 64 bytes. Applications that know they need a bigger size should use NewStrBufPlain(NULL, ) so we don't get to much reallocs. --- libcitadel/debian/rules | 5 +++++ libcitadel/lib/stringbuf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libcitadel/debian/rules b/libcitadel/debian/rules index 10af4c02b..b7664d47f 100755 --- a/libcitadel/debian/rules +++ b/libcitadel/debian/rules @@ -23,6 +23,11 @@ ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS))) LDFLAGS += -pg endif +ifneq (,$(findstring sprofiling,$(DEB_BUILD_OPTIONS))) + CFLAGS += -D SIZE_DEBUG +endif + + build: build-stamp build-stamp: dh_testdir diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index dc180176e..4498823d8 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -25,7 +25,7 @@ int ZEXPORT compress_gzip(Bytef * dest, size_t * destLen, const Bytef * source, uLong sourceLen, int level); #endif -int BaseStrBufSize = SIZ; +int BaseStrBufSize = 64; /** * Private Structure for the Stringbuffer -- 2.39.2