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

root/array.d leaks #19428

Open
dlangBugzillaToGithub opened this issue Apr 29, 2018 · 0 comments
Open

root/array.d leaks #19428

dlangBugzillaToGithub opened this issue Apr 29, 2018 · 0 comments

Comments

@dlangBugzillaToGithub
Copy link

Richard (Rikki) Andrew Cattermole reported this on 2018-04-29T13:54:20Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=18811

CC List

  • Richard (Rikki) Andrew Cattermole

Description

With -version=GC root/array.d will leak memory.
But only when dim is 1.

This is because it is putting it into smallarray, instead of allocating memory.

It can be verified by setting SMALLARRAYCAP to 0 and removing the if statement in the destructor.

During my testing with dmd as a library it will result in ~0.5mb leakage. The test cases were small, but in much larger cases this could be quite serious for reusability.

This could be a by product of other issues, I do not know.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant