> obviously the Brdline loop in main is reallocating data and block
> so they don't fit in their previous buckets and pool sbrk's more
> memory.  it would seem that pool is missing the fact that
It's probably a combination of data and block growing together
along with the occasional estrdup that is causing the fragmentation.
You should rewrite both of the reallocs to double the array when
they outgrow the current one instead of growing by a fixed amount.
The fixed amount is nice because it avoids the extra variable
tracking the maximum size of the array, but it's a terrible algorithm.

Russ

Reply via email to