From: Howard Chu Date: Wed, 9 Apr 2003 17:05:46 +0000 (+0000) Subject: Just use a fixed size slab for now X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~411 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=065116c3a3bad4c1322baef9b9f130a8d026bc71;p=openldap Just use a fixed size slab for now --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index b0a6378fbf..7975348b22 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -913,8 +913,9 @@ connection_operation( void *ctx, void *arg_v ) /* For all operations besides Add, we can use thread-local * storage for most mallocs. */ +#define SLAB_SIZE 1048576 if ( tag == LDAP_REQ_SEARCH ) { - sl_mem_create( ber_len( op->o_ber ) * 16, ctx ); + sl_mem_create( SLAB_SIZE, ctx ); ber_set_option( op->o_ber, LBER_OPT_BER_MEMCTX, ctx ); op->o_tmpmemctx = ctx; op->o_tmpalloc = sl_malloc;