Browse Source

1. fix an old typo. A purgatory must be cleaned on every LF_PURGATORY_SIZE freeing,

not every time.
2. Increase purgatory size.

include/lf.h:
  allocate larger purgatory
mysys/lf_alloc-pin.c:
  typo.
pull/843/head
Sergei Golubchik 13 years ago
parent
commit
0b5564b86c
  1. 2
      include/lf.h
  2. 2
      mysys/lf_alloc-pin.c

2
include/lf.h

@ -95,7 +95,7 @@ nolock_wrap(lf_dynarray_iterate, int,
*/
#define LF_PINBOX_PINS 4
#define LF_PURGATORY_SIZE 10
#define LF_PURGATORY_SIZE 100
typedef void lf_pinbox_free_func(void *, void *, void*);

2
mysys/lf_alloc-pin.c

@ -271,7 +271,7 @@ static int ptr_cmp(void **a, void **b)
void _lf_pinbox_free(LF_PINS *pins, void *addr)
{
add_to_purgatory(pins, addr);
if (pins->purgatory_count % LF_PURGATORY_SIZE)
if (pins->purgatory_count % LF_PURGATORY_SIZE == 0)
_lf_pinbox_real_free(pins);
}

Loading…
Cancel
Save