ITS#2864 removed sl_mark/sl_release code

This commit is contained in:
Howard Chu 2003-12-07 04:00:47 +00:00
parent b5052153c2
commit 864aea13f7
4 changed files with 1 additions and 37 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 ));
/*

View file

@ -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 )
{