Project

General

Profile

Bug #88

memory leak in GCL cache hash table

Added by Eric Allman over 2 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Low
Assignee:
Category:
libep
Start date:
11/14/2016
Due date:
% Done:

0%


Description

The open GCL cache (as implemented in gdp/gdp_gcl_cache.c) uses libep hash tables (ep/ep_hash.c). They in turn use resource pools (ep/ep_rpool.c). Resource pools only release memory when the entire pool is released, which implies that long-lived hash tables that are update-intense will leak memory over time. The hash table implementation re-uses entries in the hash chain if the key remains the same, but each new key will allocate slightly more memory.

The problem will exhibit most obviously in gdplogd, which will process lots of different log names over time, resulting in a slow but inevitable memory leak.

This should really be fixed in the libep hash table implementation, either by doing memory management internally (rather than using resource pools) or by changing resource pools to be smarter about re-using memory.

History

#1 Updated by Eric Allman almost 2 years ago

  • Subject changed from memory leak in GCL cache to memory leak in GCL cache hash table

Also available in: Atom PDF