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

Every CUDA_ERROR_FUNC could allow a memory leak #274

Open
hdelan opened this issue Feb 1, 2023 · 0 comments
Open

Every CUDA_ERROR_FUNC could allow a memory leak #274

hdelan opened this issue Feb 1, 2023 · 0 comments

Comments

@hdelan
Copy link
Contributor

hdelan commented Feb 1, 2023

If CUDA_ERROR_FUNC, CUSOLVER_ERROR_FUNC etc is called and the result != CUDA_SUCCESS, a cuda_error will be thrown and any allocated pointers will not be deallocated, causing a memory leak.

We should replace each *_ERROR_FUNC with ERROR_FUNC_WITH_POINTERS_TO_DEALLOCATE or something like that. This would also provide a list of pointers to deallocate in the event that the operation does not return CUDA_SUCCESS, preventing memory leaks.

Ping @Alexander-Kleymenov

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

No branches or pull requests

1 participant