Skip to content

Commit

Permalink
fix(trie): memory leak fix in lib/trie (#2009)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
qdm12 authored Nov 23, 2021
1 parent 0a30b3d commit 0ad5eb7
Show file tree
Hide file tree
Showing 7 changed files with 396 additions and 270 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ require (
github.com/urfave/cli v1.22.5
github.com/wasmerio/go-ext-wasm v0.3.2-0.20200326095750-0a32be6068ec
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
google.golang.org/protobuf v1.27.1
)
Expand Down Expand Up @@ -174,6 +173,7 @@ require (
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.19.0 // indirect
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
Expand Down
Loading

0 comments on commit 0ad5eb7

Please sign in to comment.