digitalmars.D.learn - Compilation with dub + dmd: out of memory
- Vlasov Roman (7/7) Feb 10 2015 I have the quite computer with 2 GB RAM. At compilation with dub
- bearophile (5/12) Feb 10 2015 Look for CTFE code, perhaps some of it is excessive. You can
- Vlasov Roman (3/15) Feb 10 2015 I think you don't understand me. 1.4~1.5 GB taked by compilator
- Daniel =?UTF-8?B?S296w6Fr?= via Digitalmars-d-learn (4/24) Feb 10 2015 V Tue, 10 Feb 2015 11:44:09 +0000
- Vlasov Roman (2/29) Feb 10 2015 https://bitbucket.org/VlasovRoman/ogl/overview
- ddos (8/42) Feb 10 2015 a bit offtopic from your thread but maybe you are interested ...
- ketmar (14/32) Feb 10 2015 "fileVersion": 1,
- Vlasov Roman (7/48) Feb 10 2015 Whether correctly I understand that the problem is that my
- ketmar (5/10) Feb 10 2015 dub tries to build the libraries your project depends on, and some of=20
- Mathias LANG (16/23) Feb 10 2015 First, if the program terminated, there is no dead data. Some
- "Per =?UTF-8?B?Tm9yZGzDtnci?= <per.nordlow gmail.com> (3/6) Feb 10 2015 DMD 2.067 will have memory (an in turn speed) optimizations in
I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?
Feb 10 2015
Vlasov Roman:I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?Look for CTFE code, perhaps some of it is excessive. You can convert some of it to run-time in a module-level static this(). Bye, bearophile
Feb 10 2015
On Tuesday, 10 February 2015 at 11:32:32 UTC, bearophile wrote:Vlasov Roman:I think you don't understand me. 1.4~1.5 GB taked by compilator at compilation my project in 100 string of code in 3 modules.I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?Look for CTFE code, perhaps some of it is excessive. You can convert some of it to run-time in a module-level static this(). Bye, bearophile
Feb 10 2015
V Tue, 10 Feb 2015 11:44:09 +0000 Vlasov Roman via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> napsáno:On Tuesday, 10 February 2015 at 11:32:32 UTC, bearophile wrote:Still it could be code dependent, can you share your code anywhere?Vlasov Roman:I think you don't understand me. 1.4~1.5 GB taked by compilator at compilation my project in 100 string of code in 3 modules.I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?Look for CTFE code, perhaps some of it is excessive. You can convert some of it to run-time in a module-level static this(). Bye, bearophile
Feb 10 2015
On Tuesday, 10 February 2015 at 11:55:43 UTC, Daniel Kozák wrote:V Tue, 10 Feb 2015 11:44:09 +0000 Vlasov Roman via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> napsáno:https://bitbucket.org/VlasovRoman/ogl/overviewOn Tuesday, 10 February 2015 at 11:32:32 UTC, bearophile wrote:Still it could be code dependent, can you share your code anywhere?Vlasov Roman:I think you don't understand me. 1.4~1.5 GB taked by compilator at compilation my project in 100 string of code in 3 modules.I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?Look for CTFE code, perhaps some of it is excessive. You can convert some of it to run-time in a module-level static this(). Bye, bearophile
Feb 10 2015
On Tuesday, 10 February 2015 at 12:18:15 UTC, Vlasov Roman wrote:On Tuesday, 10 February 2015 at 11:55:43 UTC, Daniel Kozák wrote:a bit offtopic from your thread but maybe you are interested ... at vienna university of technology i attended a similar software rendering course, some resources are publicly available (and in english) https://lva.cg.tuwien.ac.at/ecg/wiki/doku.php some impressions from previous years entries: https://lva.cg.tuwien.ac.at/ecg/wiki/doku.php?id=students:ws2013:hall_of_fameV Tue, 10 Feb 2015 11:44:09 +0000 Vlasov Roman via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> napsáno:https://bitbucket.org/VlasovRoman/ogl/overviewOn Tuesday, 10 February 2015 at 11:32:32 UTC, bearophile wrote:Still it could be code dependent, can you share your code anywhere?Vlasov Roman:I think you don't understand me. 1.4~1.5 GB taked by compilator at compilation my project in 100 string of code in 3 modules.I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?Look for CTFE code, perhaps some of it is excessive. You can convert some of it to run-time in a module-level static this(). Bye, bearophile
Feb 10 2015
On Tue, 10 Feb 2015 11:44:09 +0000, Vlasov Roman wrote:On Tuesday, 10 February 2015 at 11:32:32 UTC, bearophile wrote:"fileVersion": 1, "versions": { "dunit": "1.0.10", "descore": "1.2.0", "derelict-ft": "1.0.2", "derelict-util": "1.9.1", "tga": "0.1.0", "des": "1.3.3", "derelict-sdl2": "1.9.1", "derelict-gl3": "1.0.12" } wow-wow, do you REALLY expect all that to compile with few megs of RAM?=20 run "dub -v" and see the command lines. you'll be very surprised.=Vlasov Roman:=20 I think you don't understand me. 1.4~1.5 GB taked by compilator at compilation my project in 100 string of code in 3 modules.I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?Look for CTFE code, perhaps some of it is excessive. You can convert some of it to run-time in a module-level static this(). Bye, bearophile
Feb 10 2015
On Tuesday, 10 February 2015 at 12:42:07 UTC, ketmar wrote:On Tue, 10 Feb 2015 11:44:09 +0000, Vlasov Roman wrote:Whether correctly I understand that the problem is that my dependences have other dependences which are compiled with my project? Yes, i very surpriced, because i use only 1-2 "shared" modules. So, i can copy this modules just in my project, but in big projects this problem can be very serious.On Tuesday, 10 February 2015 at 11:32:32 UTC, bearophile wrote:"fileVersion": 1, "versions": { "dunit": "1.0.10", "descore": "1.2.0", "derelict-ft": "1.0.2", "derelict-util": "1.9.1", "tga": "0.1.0", "des": "1.3.3", "derelict-sdl2": "1.9.1", "derelict-gl3": "1.0.12" } wow-wow, do you REALLY expect all that to compile with few megs of RAM? run "dub -v" and see the command lines. you'll be very surprised.Vlasov Roman:I think you don't understand me. 1.4~1.5 GB taked by compilator at compilation my project in 100 string of code in 3 modules.I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?Look for CTFE code, perhaps some of it is excessive. You can convert some of it to run-time in a module-level static this(). Bye, bearophile
Feb 10 2015
On Tue, 10 Feb 2015 13:03:14 +0000, Vlasov Roman wrote:Whether correctly I understand that the problem is that my dependences have other dependences which are compiled with my project?dub tries to build the libraries your project depends on, and some of=20 that libraries are very big. but once that libraries are built, you may=20 be able to build your project in one go.Yes, i very surpriced, because i use only 1-2 "shared" modules. So, i can copy this modules just in my project, but in big projects this problem can be very serious.did you tried the proposed "--build-mode=3DsingleFile" mode?=
Feb 10 2015
On Tuesday, 10 February 2015 at 11:24:21 UTC, Vlasov Roman wrote:I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM. I solve this probleb by connecting swap partition, but it calls some freezes + it take ~10% of swap, and after compilation swap not released. At switching off swap as result we get ~200 MB of "dead data" in RAM, which can be released by rebooting. How i can resolve it?First, if the program terminated, there is no dead data. Some might be shown as used with utilities as top, but running 'free' will probably show that your data is still "buffered", but available for other programs to use. You can run this command to see the effect of dropping cache: free && sync && echo 3 > /proc/sys/vm/drop_caches && free Back to dub... DMD way of managing memory is fast, at the expense of memory. I could not really enjoy fast compile time on my 4 GB machine either, everything changed when I switched to 8 GB. There is an option in dub to compile every object file separately, it's '--build-mode=singleFile'. However, it has no tracking of updated files (as make as), so it rebuild everything, everytime. It makes the whole process slower, but you can use it if you run out of memory (I compiled Vibe.d on a 512 MB machine few months ago).
Feb 10 2015
On Tuesday, 10 February 2015 at 11:24:21 UTC, Vlasov Roman wrote:I have the quite computer with 2 GB RAM. At compilation with dub and dmd of small project this pair eating about 1.4~1.5 GB RAM.DMD 2.067 will have memory (an in turn speed) optimizations in CTFE.
Feb 10 2015