Issue 18811 - root/array.d leaks
Summary: root/array.d leaks
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-29 13:54 UTC by Richard (Rikki) Andrew Cattermole
Modified: 2022-12-17 10:35 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Richard (Rikki) Andrew Cattermole 2018-04-29 13:54:20 UTC
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.