Skip to content

Commit 71a8a4f

Browse files
qdm12timwu20
authored andcommitted
fix(trie): memory leak fix in lib/trie (ChainSafe#2009)
- Buffer and pool usage fixed and improved - Fix buffers not put back in pool - Write to buffer passed as arguments - Decouple pools for encoding, digests and hashers - Improve `sync.Pool` usage generally - Improve parallel encoding of branches and remove dependency on `sync/x` - Do not copy when not needed
1 parent 2e722c7 commit 71a8a4f

File tree

7 files changed

+396
-270
lines changed

7 files changed

+396
-270
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ require (
4040
github.com/urfave/cli v1.22.5
4141
github.com/wasmerio/go-ext-wasm v0.3.2-0.20200326095750-0a32be6068ec
4242
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e
43-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
4443
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
4544
google.golang.org/protobuf v1.27.1
4645
)
@@ -174,6 +173,7 @@ require (
174173
go.uber.org/multierr v1.7.0 // indirect
175174
go.uber.org/zap v1.19.0 // indirect
176175
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
176+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
177177
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect
178178
golang.org/x/text v0.3.7 // indirect
179179
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect

0 commit comments

Comments
 (0)