Skip to content

Conversation

ucwong
Copy link
Member

@ucwong ucwong commented Oct 24, 2023

This change fixes a memory leak, when running either state-tests or blockchain-tests, we allocate a 1MB fastcache during snapshot generation. fastcache is a bit special, and requires a Reset() (it has it's own memory allocator).

This change fixes a memory leak, when running either state-tests or blockchain-tests, we allocate a `1MB` fastcache during snapshot generation. `fastcache` is a bit special, and requires a `Reset()` (it has it's own memory allocator).

The `1MB` was hidden [here](https://github.com/ethereum/go-ethereum/blob/master/tests/state_test_util.go#L333) and [here](https://github.com/ethereum/go-ethereum/blob/master/tests/block_test_util.go#L146) respectively.
@ucwong ucwong marked this pull request as ready for review October 24, 2023 08:55
@ucwong ucwong merged commit 074e364 into master Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants