For fast cleanup after constructing disposable entries
ber_len_t nelem, ber_len_t size, void *ctx ));
LDAP_SLAPD_F (void) slap_sl_free LDAP_P((
void *, void *ctx ));
+LDAP_SLAPD_F (void) slap_sl_release LDAP_P((
+ void *, void *ctx ));
+LDAP_SLAPD_F (void *) slap_sl_mark LDAP_P((
+ void *ctx ));
+
LDAP_SLAPD_V (BerMemoryFunctions) slap_sl_mfuncs;
struct slab_object *so;
int i;
+ if (!sh)
+ return;
+
if (!sh->sh_stack) {
for (i = 0; i <= sh->sh_maxorder - order_start; i++) {
so = LDAP_LIST_FIRST(&sh->sh_free[i]);
}
}
+void
+slap_sl_release( void *ptr, void *ctx )
+{
+ struct slab_heap *sh = ctx;
+ if ( sh && ptr >= sh->sh_base && ptr <= sh->sh_end )
+ sh->sh_last = ptr;
+}
+
+void *
+slap_sl_mark( void *ctx )
+{
+ struct slab_heap *sh = ctx;
+ return sh->sh_last;
+}
+
/*
* Return the memory context of the current thread if the given block of
* memory belongs to it, otherwise return NULL.