From 864aea13f740f9129830f2e99b8b2d8e0c3d58d0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 7 Dec 2003 04:00:47 +0000 Subject: [PATCH] ITS#2864 removed sl_mark/sl_release code --- servers/slapd/back-bdb/index.c | 8 -------- servers/slapd/back-ldbm/index.c | 7 +------ servers/slapd/proto-slap.h | 2 -- servers/slapd/sl_malloc.c | 21 --------------------- 4 files changed, 1 insertion(+), 37 deletions(-) diff --git a/servers/slapd/back-bdb/index.c b/servers/slapd/back-bdb/index.c index 7cf7826208..554b45e3dd 100644 --- a/servers/slapd/back-bdb/index.c +++ b/servers/slapd/back-bdb/index.c @@ -164,7 +164,6 @@ static int indexer( const char *text; DB *db; struct berval *keys; - void *mark; assert( mask ); @@ -183,10 +182,6 @@ static int indexer( return LDAP_OTHER; } -#if 0 /* No longer needed, our frees are in order so nothing accumulates */ - mark = sl_mark(op->o_tmpmemctx); -#endif - if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) { rc = bdb_key_change( op->o_bd, db, txn, &presence_key, id, opid ); if( rc ) { @@ -260,9 +255,6 @@ static int indexer( } done: -#if 0 - sl_release( mark, op->o_tmpmemctx ); -#endif return rc; } diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index f468fbe2ab..62bfaef46a 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -155,10 +155,9 @@ static int indexer( { int rc, i; const char *text; - DBCache *db; + DBCache *db; AttributeDescription *ad = NULL; struct berval *keys; - void *mark; assert( mask ); @@ -181,8 +180,6 @@ static int indexer( return LDAP_OTHER; } - mark = sl_mark( op->o_tmpmemctx ); - if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) { key_change( op->o_bd, db, atname, id, opid ); } @@ -237,8 +234,6 @@ static int indexer( ldbm_cache_close( op->o_bd, db ); - sl_release( mark, op->o_tmpmemctx ); - return LDAP_SUCCESS; } diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index bc178d040f..3af0d579cf 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -1075,8 +1075,6 @@ LDAP_SLAPD_F (void) sl_mem_init LDAP_P(( void )); LDAP_SLAPD_F (void *) sl_mem_create LDAP_P(( ber_len_t size, void *ctx )); LDAP_SLAPD_F (void) sl_mem_detach LDAP_P(( void *ctx, void *memctx )); LDAP_SLAPD_F (void) sl_mem_destroy LDAP_P(( void *key, void *data )); -LDAP_SLAPD_F (void *) sl_mark LDAP_P(( void *ctx )); -LDAP_SLAPD_F (void) sl_release LDAP_P(( void *, void *ctx )); LDAP_SLAPD_F (void *) sl_context LDAP_P(( void *ptr )); /* diff --git a/servers/slapd/sl_malloc.c b/servers/slapd/sl_malloc.c index 4c862310e8..28ad962137 100644 --- a/servers/slapd/sl_malloc.c +++ b/servers/slapd/sl_malloc.c @@ -206,27 +206,6 @@ sl_free( void *ptr, void *ctx ) } } -void -sl_release( void *ptr, void *ctx ) -{ - struct slab_heap *sh = ctx; - - if ( sh && ptr >= sh->h_base && ptr <= sh->h_end ) { - sh->h_last = ptr; - } -} - -void * -sl_mark( void *ctx ) -{ - struct slab_heap *sh = ctx; - void *ret = NULL; - - if (sh) ret = sh->h_last; - - return ret; -} - void * sl_context( void *ptr ) { -- 2.39.5