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

Fix StandardGpuResources memory leak #81

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

agerasev
Copy link
Contributor

No description provided.

Copy link
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

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

That checks out, it must have been overlooked. Thanks!


// Try to allocate gpu resources multiple times in a loop.
// If resources are not properly deallocated this will cause out-of-memory error.
for _ in 0..50 {
Copy link
Owner

Choose a reason for hiding this comment

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

Going up to 16 was enough for my machine, but I guess it depends on how much temporary memory is allocated per instance. Maybe one could raise the temporary memory allocated so that it fails faster, but the worth of doing this, which is checking that the new Drop impl is called, is too low to block this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test can be considered just as reproducer of the issue. It should not be run every time, or maybe it should be removed at all because it consumes a lot of resources (all GPU memory) just to ensure that destructor is called.

Copy link
Owner

Choose a reason for hiding this comment

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

I'll go ahead and merge as-is, because there is not that much mental overhead in having an ignored test.

@Enet4 Enet4 added the bug Something isn't working label Apr 1, 2024
@Enet4 Enet4 merged commit 97cdff8 into Enet4:master Apr 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants