Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix memory leak in CgComponents #1057

Merged
merged 4 commits into from
Oct 4, 2022

Conversation

EgorkaKulikov
Copy link
Collaborator

Description

The following chain of dependencies leads us to the memory leaks.

  • we have an OBJECT `CgComponents'
  • it has a map called fieldStateManagers that is never cleaned
  • each key of type CgContext contains allExecutions field, that requires much memory

Actually, other maps have the same key, so they need to be replaced with better design solutions too.

Fixes # (1054)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manual Scenario

Performance testing on the similar examples that were used to reproduce the issue.

@EgorkaKulikov EgorkaKulikov requested a review from Damtev October 3, 2022 14:01
@EgorkaKulikov EgorkaKulikov force-pushed the egor/leak_fieldstatemanager branch from a7f0c86 to 7b2c466 Compare October 4, 2022 08:24
Copy link
Member

@Damtev Damtev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EgorkaKulikov EgorkaKulikov merged commit c9c2a0b into main Oct 4, 2022
@EgorkaKulikov EgorkaKulikov deleted the egor/leak_fieldstatemanager branch October 4, 2022 09:15
@alisevych alisevych added this to the 2022.10.1 Release milestone Oct 7, 2022
AbdullinAM pushed a commit to AbdullinAM/UTBotJava that referenced this pull request Oct 17, 2022
* Try to fix memory leak in CgFieldStateManager

* Removed unused testClassConstructors

* Make CgContext much more thin

* Clear content related maps before the processing of new test class
AbdullinAM pushed a commit to AbdullinAM/UTBotJava that referenced this pull request Oct 17, 2022
* Try to fix memory leak in CgFieldStateManager

* Removed unused testClassConstructors

* Make CgContext much more thin

* Clear content related maps before the processing of new test class
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.

3 participants