Bug 18811 – root/array.d leaks

Status
NEW
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-29T13:54:20Z
Last change time
2024-12-13T18:58:31Z
Assigned to
No Owner
Creator
Richard (Rikki) Andrew Cattermole
Moved to GitHub: dmd#19428 →

Comments

Comment #0 by alphaglosined — 2018-04-29T13:54:20Z
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.
Comment #1 by robert.schadek — 2024-12-13T18:58:31Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19428 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB