-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Incredible memory consumption for function with huge body #19543
Labels
Comments
puneet commented on 2019-03-16T17:50:19ZCreated attachment 1735
Code with a BIG function body |
puneet commented on 2019-03-16T17:54:28ZWith the static foreach, it seems it is the static foreach unrolling which takes a lot of memory.
On the other hand, if you create physical code with a large function, the compiler does not go OOM, but seems to take forever. On my i7 linux box I kill the compilation process after it failed to produce object file even after 2 hours compiler.
I have attached test.d.xz |
kinke commented on 2019-03-16T20:39:07ZAh, thanks for checking - then we have 2 separate, orthogonal issues here. |
ibuclaw (@ibuclaw) commented on 2019-03-21T07:51:10ZThis is a duplicate of another bug I think. |
ibuclaw (@ibuclaw) commented on 2019-03-21T07:55:44Z(In reply to Puneet Goel from comment #2)
> With the static foreach, it seems it is the static foreach unrolling which
> takes a lot of memory.
>
> On the other hand, if you create physical code with a large function, the
> compiler does not go OOM, but seems to take forever. On my i7 linux box I
> kill the compilation process after it failed to produce object file even
> after 2 hours compiler.
>
> I have attached test.d.xz
What you are describing I think is covered by this bug.
https://issues.dlang.org/show_bug.cgi?id=6401 |
dfj1esp02 commented on 2019-03-21T15:52:17Z6401 is dmc backend optimizer problem, this example fails in frontend. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kinke reported this on 2019-03-16T15:05:13Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=19745
CC List
Description
void write(int a) {} void main() { int a; static foreach (i; 1 .. 400_000) { a = i; write(a); } } On my box with a 64-bit LDC, the process dies due to OOM after some 18 GB. 32-bit DMD dies much sooner obviously. From https://forum.dlang.org/post/nlhybmioaoxkydicmtjj@forum.dlang.org.!!!There are attachements in the bugzilla issue that have not been copied over!!!
The text was updated successfully, but these errors were encountered: