unsigned long diff;
int i, j;
+#ifdef SLAP_NO_SL_MALLOC
+ return ber_malloc_x( size, NULL );
+#endif
+
/* ber_set_option calls us like this */
if (!ctx) return ber_memalloc_x(size, NULL);
if (ptr == NULL)
return slap_sl_malloc(size, ctx);
+#ifdef SLAP_NO_SL_MALLOC
+ return ber_memrealloc_x( ptr, size, NULL );
+#endif
+
/* Not our memory? */
if (!sh || ptr < sh->sh_base || ptr >= sh->sh_end) {
/* duplicate of realloc behavior, oh well */
if (!ptr)
return;
+#ifdef SLAP_NO_SL_MALLOC
+ ber_memfree_x( ptr, NULL );
+ return;
+#endif
+
if (!sh || ptr < sh->sh_base || ptr >= sh->sh_end) {
ber_memfree_x(ptr, NULL);
} else if (sh->sh_stack && (char *)ptr + p[-1] == sh->sh_last) {