LDAP_SLAPD_F (void) slap_sl_mem_init LDAP_P(( void ));
LDAP_SLAPD_F (void *) slap_sl_mem_create LDAP_P((
ber_len_t size, int stack, void *ctx, int flag ));
-LDAP_SLAPD_F (void) slap_sl_mem_detach LDAP_P(( void *ctx, void *memctx ));
+LDAP_SLAPD_F (void) slap_sl_mem_setctx LDAP_P(( void *ctx, void *memctx ));
LDAP_SLAPD_F (void) slap_sl_mem_destroy LDAP_P(( void *key, void *data ));
LDAP_SLAPD_F (void *) slap_sl_context LDAP_P(( void *ptr ));
}
/*
- * Separate memory context from thread context. Future users must
+ * Assign memory context to thread context. Use NULL to detach
+ * current memory context from thread. Future users must
* know the context, since ch_free/slap_sl_context() cannot find it.
*/
void
-slap_sl_mem_detach(
+slap_sl_mem_setctx(
void *thrctx,
void *memctx
)
{
- SET_MEMCTX(thrctx, NULL, 0);
+ SET_MEMCTX(thrctx, memctx, slap_sl_mem_destroy);
}
void *