MEDIUM: memory: make pool_gc() run under thread isolation

pool_gc() causes quite some stress on the memory allocator because
it calls a lot of free() calls while other threads are using malloc().
In addition, pool_gc() needs to take care of possible locking because
it may be called from pool allocators. One way to avoid all this is to
use thread_isolate() to make sure the gc runs alone. By putting less
pressure on the pools and getting rid of the locks, it may even take
less time to complete.

(cherry picked from commit c0e2ff202bda535aa60f3dc272ccf19a7b4f5094)
[wt: this is required for subsequent lockless pool fixes]
Signed-off-by: Willy Tarreau <w@1wt.eu>
1 file changed