Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
April 03, 2005 cc1d: out of memory allocating 4072 bytes after a total of 199581696 bytes | ||||
---|---|---|---|---|
| ||||
when compile a large file (10K generated-lines), although the system has ~ 650M memory. $ free total used free shared buffers cached Mem: 905732 216912 688820 0 7996 116968 -/+ buffers/cache: 91948 813784 Swap: 1050800 0 1050800 $ make test.o dmd -version=DEBUG -g -debug -oftest.o -c test.d cc1d: out of memory allocating 4072 bytes after a total of 199581696 bytes make: *** [test.o] Error 1 $ free total used free shared buffers cached Mem: 905732 216976 688756 0 8128 116968 -/+ buffers/cache: 91880 813852 Swap: 1050800 0 1050800 |
April 03, 2005 Re: cc1d: out of memory allocating 4072 bytes after a total of 199581696 bytes | ||||
---|---|---|---|---|
| ||||
Posted in reply to bug | The text allgnment is wrong in the original message, it should be: >$ free > total used free shared buffers cached >Mem: 905732 216912 688820 0 7996 116968 >-/+ buffers/cache: 91948 813784 >Swap: 1050800 0 1050800 i.e.: the free mem = 688820 K, before and after the compilation. In article <d2ncbm$1aa1$1@digitaldaemon.com>, bug@d.com says... > >when compile a large file (10K generated-lines), although the system has ~ 650M >memory. > >$ free > total used free shared buffers cached >Mem: 905732 216912 688820 0 7996 116968 >-/+ buffers/cache: 91948 813784 >Swap: 1050800 0 1050800 > >$ make test.o >dmd -version=DEBUG -g -debug -oftest.o -c test.d > >cc1d: out of memory allocating 4072 bytes after a total of 199581696 bytes make: *** [test.o] Error 1 > >$ free > total used free shared buffers cached >Mem: 905732 216976 688756 0 8128 116968 >-/+ buffers/cache: 91880 813852 >Swap: 1050800 0 1050800 > > |
April 03, 2005 Re: cc1d: out of memory allocating 4072 bytes after a total of 199581696 bytes | ||||
---|---|---|---|---|
| ||||
Posted in reply to bug Attachments: | | In article <d2ncbm$1aa1$1@digitaldaemon.com>, bug@d.com says... | |> when compile a large file (10K generated-lines), although the system |> has ~ 650M memory. <snip> What about the memory usage during the compilation? Try eg "top" with an ~ update frequency of 1 second. Do you use templates in your code? On what system are you running? Could you repeat that compilation with DMD 0.119? What happens if you remove the "-g -debug" flags? Thomas |
April 03, 2005 Re: cc1d: out of memory allocating 4072 bytes after a total of 199581696 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kühne | >What about the memory usage during the compilation? Try eg "top" with an ~ update frequency of 1 second. $ top -d 0.5 The memory used by cc1d continous grows to ~ 250M. >Do you use templates in your code? Yes. >On what system are you running? $ uname -a Linux 2.6.11-gentoo-r4 #2 SMP Fri Apr 1 22:43:54 GMT 2005 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz GenuineIntel GNU/Linux >Could you repeat that compilation with DMD 0.119? No problem with DMD 119: dmd uses about 210M memory. >What happens if you remove the "-g -debug" flags? No difference. DMD 119 always succeeds; and gdc fails (after about 250M shown in top): virtual memory exhausted: Cannot allocate memory |
April 03, 2005 Re: cc1d: out of memory allocating 4072 bytes after a total of 199581696 | ||||
---|---|---|---|---|
| ||||
Posted in reply to bug Attachments: | bug@d.com wrote: |> What about the memory usage during the compilation? Try eg "top" with |> an ~ update frequency of 1 second. | | | $ top -d 0.5 | | The memory used by cc1d continous grows to ~ 250M. | | |>Do you use templates in your code? | | | Yes. | | |>On what system are you running? | | | $ uname -a | Linux 2.6.11-gentoo-r4 #2 SMP Fri Apr 1 22:43:54 GMT 2005 i686 | Intel(R) Pentium(R) 4 CPU 2.60GHz GenuineIntel GNU/Linux | | |>Could you repeat that compilation with DMD 0.119? | | | No problem with DMD 119: dmd uses about 210M memory. | | |>What happens if you remove the "-g -debug" flags? | | | No difference. DMD 119 always succeeds; and gdc fails (after about 250M shown | in top): | | virtual memory exhausted: Cannot allocate memory Let's see if this is a GDC specific frontend bug. Can you repeat that test with DMD 0.110 (ftp://ftp.digitalmars.com/dmd.110.zip)? Most of GDC-0.10's frontent is based on the DMD 0.110 code. If DMD 0.110 doesn't show the same memory problem could you please send me the generator and/or generated sourcecode via email? (remove the obvious part of the email address) Thomas |
April 03, 2005 Re: cc1d: out of memory allocating 4072 bytes after a total of 199581696 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kühne | >Let's see if this is a GDC specific frontend bug. Can you repeat that >test with DMD 0.110 (ftp://ftp.digitalmars.com/dmd.110.zip)? >Most of GDC-0.10's frontent is based on the DMD 0.110 code. for DMD 110: with -g -debug, Internal error: ../ztc/elfobj.c 1251 without flag, it can run thru. >If DMD 0.110 doesn't show the same memory problem could you please send me the generator and/or generated sourcecode via email? My boss may fire me :-(, sorry. I tried gdc on another machine, also with 600M+ free memory when compiling, Linux 2.6.7-gentoo-r11 #1 Fri Sep 17 01:05:07 GMT 2004 i686 Intel(R) Pentium(R) M processor 1700MHz GenuineIntel GNU/Linux with/without '-g -debug' flag, gdc fails with the same message: virtual memory exhausted: Cannot allocate memory This happens after alloc' ~ 250M memory (show from top). |
April 03, 2005 Re: cc1d: out of memory allocating 4072 bytes after a total of 199581696 | ||||
---|---|---|---|---|
| ||||
Posted in reply to bug Attachments: | bug@d.com wrote: |> If DMD 0.110 doesn't show the same memory problem could you |> please send me the generator and/or generated sourcecode |> via email? | | | My boss may fire me :-(, sorry. I'm not interrested in you actual code *g* but on the kind(templates inside of templates, lot's of static arrays, whatever) of code used. Could you please write an IP free sample, e.g. something like http://dstress.kuehne.cn/run/many_functions_01.d ? | I tried gdc on another machine, also with 600M+ free memory when | compiling, | | Linux 2.6.7-gentoo-r11 #1 Fri Sep 17 01:05:07 GMT 2004 i686 Intel(R) | Pentium(R) M processor 1700MHz GenuineIntel GNU/Linux | | with/without '-g -debug' flag, gdc fails with the same message: | | virtual memory exhausted: Cannot allocate memory | | This happens after alloc' ~ 250M memory (show from top). Can you increase the size of your sample a bit, so that DMD 0.119 crosses the 250M border? What happens if you run gdc with the "-c" flag - just to make sure that memory leaks into the linking stage aren't the issue. Thomas |
Copyright © 1999-2021 by the D Language Foundation