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 cstdlib memleak support #18474

Closed
wants to merge 1 commit into from

Conversation

ronawho
Copy link
Contributor

@ronawho ronawho commented Sep 28, 2021

#18465 optimized memory leak tracking to avoid taking a lock when the real
allocation size is below memThreshold, but real allocation size isn't
implemented for cstdlib memory and the threshold check failed to account for
the not-implemented sentinel, which led to not tracking free's for cstdlib. Fix
that here by checking if chpl_mem_real_alloc_size on a non-NULL pointer
returns 0.

18465 optimized memory leak tracking to avoid taking a lock when the real
allocation size is below `memThreshold`, but real allocation size isn't
implemented for `cstdlib` memory and the threshold check failed to account for
the not-implemented sentinel, which led to not tracking free's for cstdlib. Fix
that here by checking if `chpl_mem_real_alloc_size` on a non-NULL pointer
returns 0.

Signed-off-by: Elliot Ronaghan <ronawho@gmail.com>
Copy link
Member

@gbtitus gbtitus left a comment

Choose a reason for hiding this comment

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

Yep. Sorry I missed this.

@ronawho
Copy link
Contributor Author

ronawho commented Sep 28, 2021

Superseded by #18480

@ronawho ronawho closed this Sep 28, 2021
@ronawho ronawho deleted the fix-cstdlib-memleak branch January 11, 2022 05:51
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