digitalmars.D.learn - Out of memory during compilation
- Matt Gamble (14/14) May 02 2018 I have a large program (for me) with several thousand lines of
- Joakim (4/18) May 02 2018 My guess would be Optlink, the old OMF linker. Are you using that
- Matt Gamble (6/28) May 02 2018 I believe I'm using the vs linker (link.exe). This is what is
- Joakim (6/35) May 02 2018 The idea was to check the log output and see where it's failing,
- rikki cattermole (6/23) May 02 2018 Let me start by saying shared library support doesn't work (some people
- Matt Gamble (3/11) May 02 2018 Thanks, I'll check out Ldc and see if that helps. Will I still be
- rikki cattermole (2/16) May 02 2018 Of course.
I have a large program (for me) with several thousand lines of code. Recently when I've tried to compile under debug (-g -unittest) with VS2017, dmd2.076.1, windows 10, 8Gb ram), I've had the following output: Compiling SKaTERoptimizerD.d... Fatal Error: Out of memory Building x64\Debug\SKaTERoptimizerD.exe failed! When compiled under release (-O -release -inline -boundscheck=off) mode it works fine. Any advice on how to combat this? Do I need to start compiling DLLs? Does that change how the linking would be done? Would that affect the debugger? Any help is appreciated, Matt
May 02 2018
On Wednesday, 2 May 2018 at 14:25:35 UTC, Matt Gamble wrote:I have a large program (for me) with several thousand lines of code. Recently when I've tried to compile under debug (-g -unittest) with VS2017, dmd2.076.1, windows 10, 8Gb ram), I've had the following output: Compiling SKaTERoptimizerD.d... Fatal Error: Out of memory Building x64\Debug\SKaTERoptimizerD.exe failed! When compiled under release (-O -release -inline -boundscheck=off) mode it works fine. Any advice on how to combat this? Do I need to start compiling DLLs? Does that change how the linking would be done? Would that affect the debugger? Any help is appreciated, MattMy guess would be Optlink, the old OMF linker. Are you using that or the VS linker? Try adding the -v flag to check log output for where it fails.
May 02 2018
On Wednesday, 2 May 2018 at 14:30:19 UTC, Joakim wrote:On Wednesday, 2 May 2018 at 14:25:35 UTC, Matt Gamble wrote:I believe I'm using the vs linker (link.exe). This is what is automatically set for VisualD under x64 mode. I tried the -v flag and got compiler output messages that are 13,758 lines long. The "Fatal Error: Out of memory" happens at line 13,639. How do I use this information?I have a large program (for me) with several thousand lines of code. Recently when I've tried to compile under debug (-g -unittest) with VS2017, dmd2.076.1, windows 10, 8Gb ram), I've had the following output: Compiling SKaTERoptimizerD.d... Fatal Error: Out of memory Building x64\Debug\SKaTERoptimizerD.exe failed! When compiled under release (-O -release -inline -boundscheck=off) mode it works fine. Any advice on how to combat this? Do I need to start compiling DLLs? Does that change how the linking would be done? Would that affect the debugger? Any help is appreciated, MattMy guess would be Optlink, the old OMF linker. Are you using that or the VS linker? Try adding the -v flag to check log output for where it fails.
May 02 2018
On Wednesday, 2 May 2018 at 15:13:58 UTC, Matt Gamble wrote:On Wednesday, 2 May 2018 at 14:30:19 UTC, Joakim wrote:The idea was to check the log output and see where it's failing, while compiling or linking. It sounds like you're saying while compiling? If so, are you compiling all your D files at once? You can either try separate compilation or a 64-bit compiler, as Rikki suggests.On Wednesday, 2 May 2018 at 14:25:35 UTC, Matt Gamble wrote:I believe I'm using the vs linker (link.exe). This is what is automatically set for VisualD under x64 mode. I tried the -v flag and got compiler output messages that are 13,758 lines long. The "Fatal Error: Out of memory" happens at line 13,639. How do I use this information?I have a large program (for me) with several thousand lines of code. Recently when I've tried to compile under debug (-g -unittest) with VS2017, dmd2.076.1, windows 10, 8Gb ram), I've had the following output: Compiling SKaTERoptimizerD.d... Fatal Error: Out of memory Building x64\Debug\SKaTERoptimizerD.exe failed! When compiled under release (-O -release -inline -boundscheck=off) mode it works fine. Any advice on how to combat this? Do I need to start compiling DLLs? Does that change how the linking would be done? Would that affect the debugger? Any help is appreciated, MattMy guess would be Optlink, the old OMF linker. Are you using that or the VS linker? Try adding the -v flag to check log output for where it fails.
May 02 2018
On 03/05/2018 2:25 AM, Matt Gamble wrote:I have a large program (for me) with several thousand lines of code. Recently when I've tried to compile under debug (-g -unittest) with VS2017, dmd2.076.1, windows 10, 8Gb ram), I've had the following output: Compiling SKaTERoptimizerD.d... Fatal Error: Out of memory Building x64\Debug\SKaTERoptimizerD.exe failed! When compiled under release (-O -release -inline -boundscheck=off) mode it works fine. Any advice on how to combat this? Do I need to start compiling DLLs? Does that change how the linking would be done? Would that affect the debugger? Any help is appreciated, MattLet me start by saying shared library support doesn't work (some people will say it does work partially, but it doesn't). The problem for you (I think) is that dmd is compiled as a 32bit executable. Either compile dmd as 64bit, or grab ldc (64bit) which will raise the limit from 2gb of ram :)
May 02 2018
On Wednesday, 2 May 2018 at 14:31:16 UTC, rikki cattermole wrote:On 03/05/2018 2:25 AM, Matt Gamble wrote:Thanks, I'll check out Ldc and see if that helps. Will I still be able to use the VS debugger functionality?[...]Let me start by saying shared library support doesn't work (some people will say it does work partially, but it doesn't). The problem for you (I think) is that dmd is compiled as a 32bit executable. Either compile dmd as 64bit, or grab ldc (64bit) which will raise the limit from 2gb of ram :)
May 02 2018
On 03/05/2018 3:21 AM, Matt Gamble wrote:On Wednesday, 2 May 2018 at 14:31:16 UTC, rikki cattermole wrote:Of course.On 03/05/2018 2:25 AM, Matt Gamble wrote:Thanks, I'll check out Ldc and see if that helps. Will I still be able to use the VS debugger functionality?[...]Let me start by saying shared library support doesn't work (some people will say it does work partially, but it doesn't). The problem for you (I think) is that dmd is compiled as a 32bit executable. Either compile dmd as 64bit, or grab ldc (64bit) which will raise the limit from 2gb of ram :)
May 02 2018