zlog/diode
Olivier Poitrey e0f8de6c35 Fix usage of sync.Pool
The current usage of sync.Pool is leaky because it stores an arbitrary
sized buffer into the pool. However, sync.Pool assumes that all items in the
pool are interchangeable from a memory cost perspective. Due to the unbounded
size of a buffer that may be added, it is possible for the pool to eventually
pin arbitrarily large amounts of memory in a live-lock situation.

As a simple fix, we just set a maximum size that we permit back into the pool.
2018-09-19 00:20:01 -07:00
..
internal/diodes Embed the diode lib to avoid test dependencies 2018-05-24 19:15:40 -07:00
diode_example_test.go Embed the diode lib to avoid test dependencies 2018-05-24 19:15:40 -07:00
diode_test.go Embed the diode lib to avoid test dependencies 2018-05-24 19:15:40 -07:00
diode.go Fix usage of sync.Pool 2018-09-19 00:20:01 -07:00