- Nov 04, 2011
-
-
- Nov 03, 2011
-
-
Quanah Gibson-Mount authored
-
-
This reverts commit 877ebdf5.
-
-
This reverts commit b68fa5ec.
-
-
Quanah Gibson-Mount authored
-
-
Quanah Gibson-Mount authored
-
-
-
-
Quanah Gibson-Mount authored
-
-
-
-
Quanah Gibson-Mount authored
-
-
Quanah Gibson-Mount authored
-
Compile with -DUSE_VALGRIND. It will attempt to keep Valgrind informed of our memory allocations. Frees are trickier since they may be deferred indefinitely.
-
-
-
-
Store a tail only in freed blocks. (Alignment ensures there will be room.) Put the freed mark in next block's head.
-
ctx==NULL code. Add enum No_sl_malloc to avoid #ifdef SLAP_NO_SL_MALLOC.
-
Ensure Align >= sizeof(ber_len_t), to clarify the code's requirements. Rearrange a slap_sl_malloc() branch to factor out ch_malloc fallbacks. Fix range check (ptr+size >= endptr) -> (size >= endptr-ptr). Fix debug msg.
-
-
Check count*size overflow. Omit slap_sl_malloc failure check, it cannot fail.
-
Quanah Gibson-Mount authored
slap_sl_malloc could return failure. Exit instead, like the rest of sl_malloc. Since we increase size, reduce it before Debug() and/or fallback to ch_malloc. Debug() before exit() on failure. Tweak debug formats and a comment. Conflicts: servers/slapd/sl_malloc.c
-
Move thread/nothread code to macros SET_MEMCTX()/GET_MEMCTX(). Rename some thread/memory contexts 'ctx' to thrctx/memctx to avoid confusion.
-
Preserve 2*int alignment on hosts where sizeof(int) == sizeof(ber_len_t). If realloc of last block falls back to ch_malloc, free last block properly. Fix range check (ptr + size < endptr) --> (size < endptr - ptr).
-
Also use -Align instead of ~pad: Valid also for non-twos complement.
-
-
-
Bugfix: Switching implementation stack<->pool on an old context could crash or leak, it ran the wrong implementation's cleanup code. Cleanup: Factor out identical stack/pool code. Call slap_sl_mem_destroy(NULL,) instead of copying its pool code. API change: slap_sl_mem_destroy(key=NULL,) gets a new meaning. Does not affect current OpenLDAP code, it never passed NULL.
-
Quanah Gibson-Mount authored
-
-
Quanah Gibson-Mount authored
-
-