www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dsss build, tango, GC ?

reply Fred Burton <fredlburton gmail.com> writes:
Hi, I have (sort of) 2 questions:

Background:
I was doing some coding using Phobos, and recently switched to using Tango.

1. I'm trying to build using dsss and it says :
/usr/bin/ld: cannot find -lphobos
collect2: ld returned 1 exit status
--- errorlevel 1
Command /usr/bin/rebuild returned with code 65280, aborting.
Error: Command failed, aborting.

Then I have a shellscript that links all the object files that dsss produced
together :
cd dsss_objs/D
dmd -v *.o -L-ldl ~/d/lib/libDerelictSDL.a  ~/d/lib/libDerelictSDLImage.a
~/d/lib/libDerelictGL.a ~/d/lib/libDerelictGLU.a ~/d/lib/libDerelictUtil.a
/usr/lib/libSDL_image.a

Which outputs:

gcc flb.gui.boxmaker.o flb.gui.fontdata.o
...
tango.core.Array.o tango.core.BitManip.o tango.core.Exception.o
tango.core.Memory.o
tango.core.Thread.o tango.core.tools.Demangler.o
tango.core.tools.LinuxStackTrace.o
tango.core.tools.StackTrace.o tango.core.tools.TraceExceptions.o
tango.core.Traits.o
tango.io.Console.o tango.io.device.Conduit.o tango.io.device.Device.o
tango.io.device.File.o
tango.io.model.IConduit.o tango.io.stream.Buffered.o tango.io.stream.Iterator.o
tango.io.stream.Lines.o tango.stdc.config.o tango.stdc.ctype.o
tango.stdc.errno.o
tango.stdc.inttypes.o tango.stdc.locale.o tango.stdc.posix.config.o
tango.stdc.posix.dlfcn.o
tango.stdc.posix.fcntl.o tango.stdc.posix.inttypes.o tango.stdc.posix.langinfo.o
tango.stdc.posix.poll.o tango.stdc.posix.pthread.o tango.stdc.posix.pwd.o
tango.stdc.posix.sched.o tango.stdc.posix.semaphore.o tango.stdc.posix.signal.o
tango.stdc.posix.stdlib.o tango.stdc.posix.sys.mman.o
tango.stdc.posix.sys.select.o
tango.stdc.posix.sys.stat.o tango.stdc.posix.sys.time.o
tango.stdc.posix.sys.types.o
tango.stdc.posix.sys.wait.o tango.stdc.posix.time.o tango.stdc.posix.ucontext.o
tango.stdc.posix.unistd.o tango.stdc.signal.o tango.stdc.stdarg.o
tango.stdc.stddef.o
tango.stdc.stdint.o tango.stdc.stdio.o tango.stdc.stdlib.o tango.stdc.string.o
tango.stdc.stringz.o tango.stdc.time.o tango.sys.Common.o
tango.sys.consts.errno.o
tango.sys.consts.fcntl.o tango.sys.consts.unistd.o
tango.sys.linux.consts.errno.o
tango.sys.linux.consts.fcntl.o tango.sys.linux.consts.unistd.o
tango.sys.linux.epoll.o
tango.sys.linux.linux.o tango.text.convert.DateTime.o tango.text.convert.Float.o
tango.text.convert.Format.o tango.text.convert.Integer.o
tango.text.convert.Layout.o
tango.text.convert.Utf.o tango.text.locale.Data.o tango.text.locale.Posix.o
tango.text.Util.o
tango.time.chrono.Calendar.o tango.time.chrono.Gregorian.o tango.time.Clock.o
tango.time.Time.o tango.time.WallClock.o tango.util.log.AppendConsole.o
tango.util.log.Config.o tango.util.log.LayoutDate.o tango.util.log.Log.o
tango.util.log.model.ILogger.o tango.util.log.Trace.o -o flb.gui.boxmaker -m32
-ldl -Xlinker -
L/usr/lib ~/d/lib/libDerelictSDL.a ~/d/lib/libDerelictSDLImage.a
~/d/lib/libDerelictGL.a
~/d/lib/libDerelictGLU.a ~/d/lib/libDerelictUtil.a /usr/lib/libSDL_image.a
-ltango-dmd -
lpthread -lm

And this generates a binary file which seems to work.

However, it leaks memory as if the GC is not actually working at all. (I have
some word wrap
code that allocates dynamic arrays and returns them to the caller .. which has
them in a local
variable and later discards them)

Valgrind reports that as a leak ...

If I manually delete some intermediate arrays, it leaks less...

Isn't the GC supposed to be able to free the memory?
Jun 09 2010
parent reply Jacob Carlborg <doob me.com> writes:
On 2010-06-09 21:16, Fred Burton wrote:
 Hi, I have (sort of) 2 questions:

 Background:
 I was doing some coding using Phobos, and recently switched to using Tango.

 1. I'm trying to build using dsss and it says :
 /usr/bin/ld: cannot find -lphobos
 collect2: ld returned 1 exit status
 --- errorlevel 1
 Command /usr/bin/rebuild returned with code 65280, aborting.
 Error: Command failed, aborting.
You have to change your default rebuild configuration file. It's located in /etc/rebuild/default on Posix systems. Change the "profile" value to "dmd-posix-tango". Looking at the "dmd-posix" file, you can see, in the link section, that it explicitly links to "phobos" which is not necessary (at least not anymore). That's why you get the linker error.
 Then I have a shellscript that links all the object files that dsss produced
together :
 cd dsss_objs/D
 dmd -v *.o -L-ldl ~/d/lib/libDerelictSDL.a  ~/d/lib/libDerelictSDLImage.a
 ~/d/lib/libDerelictGL.a ~/d/lib/libDerelictGLU.a ~/d/lib/libDerelictUtil.a
 /usr/lib/libSDL_image.a

 Which outputs:

 gcc flb.gui.boxmaker.o flb.gui.fontdata.o
 ...
 tango.core.Array.o tango.core.BitManip.o tango.core.Exception.o
tango.core.Memory.o
 tango.core.Thread.o tango.core.tools.Demangler.o
tango.core.tools.LinuxStackTrace.o
 tango.core.tools.StackTrace.o tango.core.tools.TraceExceptions.o
tango.core.Traits.o
 tango.io.Console.o tango.io.device.Conduit.o tango.io.device.Device.o
tango.io.device.File.o
 tango.io.model.IConduit.o tango.io.stream.Buffered.o tango.io.stream.Iterator.o
 tango.io.stream.Lines.o tango.stdc.config.o tango.stdc.ctype.o
tango.stdc.errno.o
 tango.stdc.inttypes.o tango.stdc.locale.o tango.stdc.posix.config.o
tango.stdc.posix.dlfcn.o
 tango.stdc.posix.fcntl.o tango.stdc.posix.inttypes.o
tango.stdc.posix.langinfo.o
 tango.stdc.posix.poll.o tango.stdc.posix.pthread.o tango.stdc.posix.pwd.o
 tango.stdc.posix.sched.o tango.stdc.posix.semaphore.o tango.stdc.posix.signal.o
 tango.stdc.posix.stdlib.o tango.stdc.posix.sys.mman.o
tango.stdc.posix.sys.select.o
 tango.stdc.posix.sys.stat.o tango.stdc.posix.sys.time.o
tango.stdc.posix.sys.types.o
 tango.stdc.posix.sys.wait.o tango.stdc.posix.time.o tango.stdc.posix.ucontext.o
 tango.stdc.posix.unistd.o tango.stdc.signal.o tango.stdc.stdarg.o
tango.stdc.stddef.o
 tango.stdc.stdint.o tango.stdc.stdio.o tango.stdc.stdlib.o tango.stdc.string.o
 tango.stdc.stringz.o tango.stdc.time.o tango.sys.Common.o
tango.sys.consts.errno.o
 tango.sys.consts.fcntl.o tango.sys.consts.unistd.o
tango.sys.linux.consts.errno.o
 tango.sys.linux.consts.fcntl.o tango.sys.linux.consts.unistd.o
tango.sys.linux.epoll.o
 tango.sys.linux.linux.o tango.text.convert.DateTime.o
tango.text.convert.Float.o
 tango.text.convert.Format.o tango.text.convert.Integer.o
tango.text.convert.Layout.o
 tango.text.convert.Utf.o tango.text.locale.Data.o tango.text.locale.Posix.o
tango.text.Util.o
 tango.time.chrono.Calendar.o tango.time.chrono.Gregorian.o tango.time.Clock.o
 tango.time.Time.o tango.time.WallClock.o tango.util.log.AppendConsole.o
 tango.util.log.Config.o tango.util.log.LayoutDate.o tango.util.log.Log.o
 tango.util.log.model.ILogger.o tango.util.log.Trace.o -o flb.gui.boxmaker -m32
-ldl -Xlinker -
 L/usr/lib ~/d/lib/libDerelictSDL.a ~/d/lib/libDerelictSDLImage.a
~/d/lib/libDerelictGL.a
 ~/d/lib/libDerelictGLU.a ~/d/lib/libDerelictUtil.a /usr/lib/libSDL_image.a
-ltango-dmd -
 lpthread -lm

 And this generates a binary file which seems to work.

 However, it leaks memory as if the GC is not actually working at all. (I have
some word wrap
 code that allocates dynamic arrays and returns them to the caller .. which has
them in a local
 variable and later discards them)

 Valgrind reports that as a leak ...

 If I manually delete some intermediate arrays, it leaks less...

 Isn't the GC supposed to be able to free the memory?
I think that the GC doesn't give back memory to the system. It keeps it for future use. -- /Jacob Carlborg
Jun 09 2010
next sibling parent Fred Burton <fredlburton gmail.com> writes:
 I think that the GC doesn't give back memory to the system. It keeps it
 for future use.
Ah, but I'm seeing the memory usage increasing over time still... for a test run of some sort, my largest loss record is: ==3191== 16,240,909 bytes in 35,757 blocks are definitely lost in loss record 1,017 of 1,017 ==3191== at 0x40238FC: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==3191== by 0x80817CC: gc_malloc (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x807DD20: _d_arrayappendcT (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804B937: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa15__foreachbody24MFKAaZi (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804BA33: _D5tango4text4Util20__T12PatternFructTaZ12PatternFruct7opApplyMFDFKAaZiZi (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804B90D: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804F16C: _D3flb3gui8wordwrap9word_wrapFAAafC3flb3gui9themebase10IStyleTextZAAa (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804E9CE: _D3flb3gui8somewind13ACustomWindow4drawMFC3flb3gui7guibase13Idraw_contextZv (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804DEA2: _D3flb3gui7guibase14window_manager4drawMFC3flb3gui7guibase13Idraw_contextZv (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804D889: _D3flb3gui5glgui5GlGui3runMFZv (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x804D8FB: _Dmain (in /home/fburton/lang/d/guigl/flb.gui.boxmaker) ==3191== by 0x807C7E3: _D2rt8compiler3dmd2rt6dmain24mainUiPPaZi7runMainMFZv (in /home/fburton/lang/d/guigl/flb.gui.boxmaker)
Jun 09 2010
prev sibling next sibling parent Fred Burton <fredlburton gmail.com> writes:
Are you sure that I'm not somehow linking wrong and not getting a functioning
GC ?


+ After running for 4 minutes with valgrind:

==3214== 224,418,252 bytes in 486,492 blocks are definitely lost in loss record
1,030 of 1,030
==3214==    at 0x4024918: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==3214==    by 0x80817CC: gc_malloc (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x807DD20: _d_arrayappendcT (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804B937:
_D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa15__foreachbody24MFKAaZi (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804BA33:
_D5tango4text4Util20__T12PatternFructTaZ12PatternFruct7opApplyMFDFKAaZiZi (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804B90D: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804F16C:
_D3flb3gui8wordwrap9word_wrapFAAafC3flb3gui9themebase10IStyleTextZAAa (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804E9CE:
_D3flb3gui8somewind13ACustomWindow4drawMFC3flb3gui7guibase13Idraw_contextZv (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804DEA2:
_D3flb3gui7guibase14window_manager4drawMFC3flb3gui7guibase13Idraw_contextZv (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804D889: _D3flb3gui5glgui5GlGui3runMFZv (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x804D8FB: _Dmain (in
/home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==    by 0x807C7E3: _D2rt8compiler3dmd2rt6dmain24mainUiPPaZi7runMainMFZv
(in /home/fburton/lang/d/guigl/flb.gui.boxmaker)
==3214==
Jun 10 2010
prev sibling parent reply Ferd Burton <fredlburton gmail.com> writes:
== Quote from Jacob Carlborg (doob me.com)'s article
 On 2010-06-09 21:16, Fred Burton wrote:
 Hi, I have (sort of) 2 questions:

 Background:
 I was doing some coding using Phobos, and recently switched to using Tango.

 1. I'm trying to build using dsss and it says :
 /usr/bin/ld: cannot find -lphobos
 collect2: ld returned 1 exit status
 --- errorlevel 1
 Command /usr/bin/rebuild returned with code 65280, aborting.
 Error: Command failed, aborting.
You have to change your default rebuild configuration file. It's located in /etc/rebuild/default on Posix systems. Change the "profile" value to "dmd-posix-tango". Looking at the "dmd-posix" file, you can see, in the link section, that it explicitly links to "phobos" which is not necessary (at least not anymore). That's why you get the linker error.
Thanks. (trying...) okay, now it gives: /usr/bin/ld: cannot find -ltango-base-dmd collect2: ld returned 1 exit status --- errorlevel 1 Command /usr/bin/rebuild returned with code 65280, aborting. Error: Command failed, aborting. hmm... I have a /usr/lib/libtango-dmd.a editing dmd-posix-tango to go from cmd=dmd -L--start-group -L-ltango-base-dmd $i -of$o to cmd=dmd -L--start-group -L-ltango-dmd $i -of$o works! Now it seems to cleanly build with tango. It does still leak memory though ( ran for 4 minutes, 20 seconds and: ==3411== 237,749,649 bytes in 515,441 blocks are definitely lost in loss record 1,024 of 1,024 ==3411== at 0x4024918: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==3411== by 0x806D11C: gc_malloc (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8069670: _d_arrayappendcT (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8064F17: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa15__foreachbody24MFKAaZi (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8065013: _D5tango4text4Util20__T12PatternFructTaZ12PatternFruct7opApplyMFDFKAaZiZi (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8064EED: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8065B9C: _D3flb3gui8wordwrap9word_wrapFAAafC3flb3gui9themebase10IStyleTextZAAa (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x80659BE: _D3flb3gui8somewind13ACustomWindow4drawMFC3flb3gui7guibase13Idraw_contextZv (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8063672: _D3flb3gui7guibase14window_manager4drawMFC3flb3gui7guibase13Idraw_contextZv (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x804A2C9: _D3flb3gui5glgui5GlGui3runMFZv (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x804A33B: _Dmain (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8068133: _D2rt8compiler3dmd2rt6dmain24mainUiPPaZi7runMainMFZv (in /home/fburton/lang/d/guigl/glgui) ==3411== )
Jun 10 2010
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2010-06-10 23:20, Ferd Burton wrote:
 == Quote from Jacob Carlborg (doob me.com)'s article
 On 2010-06-09 21:16, Fred Burton wrote:
 Hi, I have (sort of) 2 questions:

 Background:
 I was doing some coding using Phobos, and recently switched to using Tango.

 1. I'm trying to build using dsss and it says :
 /usr/bin/ld: cannot find -lphobos
 collect2: ld returned 1 exit status
 --- errorlevel 1
 Command /usr/bin/rebuild returned with code 65280, aborting.
 Error: Command failed, aborting.
You have to change your default rebuild configuration file. It's located in /etc/rebuild/default on Posix systems. Change the "profile" value to "dmd-posix-tango". Looking at the "dmd-posix" file, you can see, in the link section, that it explicitly links to "phobos" which is not necessary (at least not anymore). That's why you get the linker error.
Thanks. (trying...) okay, now it gives: /usr/bin/ld: cannot find -ltango-base-dmd collect2: ld returned 1 exit status --- errorlevel 1 Command /usr/bin/rebuild returned with code 65280, aborting. Error: Command failed, aborting. hmm... I have a /usr/lib/libtango-dmd.a editing dmd-posix-tango to go from cmd=dmd -L--start-group -L-ltango-base-dmd $i -of$o to cmd=dmd -L--start-group -L-ltango-dmd $i -of$o works!
Previously (when that config file was written) tango was split in two libraries: base and user. Now it's just one library.
 Now it seems to cleanly build with tango.
That's good to hear
 It does still leak memory though ( ran for 4 minutes, 20 seconds and:

 ==3411== 237,749,649 bytes in 515,441 blocks are definitely lost in loss
record 1,024 of 1,024
 ==3411==    at 0x4024918: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
 ==3411==    by 0x806D11C: gc_malloc (in /home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x8069670: _d_arrayappendcT (in
/home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x8064F17:
_D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa15__foreachbody24MFKAaZi (in
 /home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x8065013:
_D5tango4text4Util20__T12PatternFructTaZ12PatternFruct7opApplyMFDFKAaZiZi (in
 /home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x8064EED: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa (in
/home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x8065B9C:
_D3flb3gui8wordwrap9word_wrapFAAafC3flb3gui9themebase10IStyleTextZAAa (in
 /home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x80659BE:
_D3flb3gui8somewind13ACustomWindow4drawMFC3flb3gui7guibase13Idraw_contextZv (in
 /home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x8063672:
_D3flb3gui7guibase14window_manager4drawMFC3flb3gui7guibase13Idraw_contextZv (in
 /home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x804A2C9: _D3flb3gui5glgui5GlGui3runMFZv (in
/home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x804A33B: _Dmain (in /home/fburton/lang/d/guigl/glgui)
 ==3411==    by 0x8068133: _D2rt8compiler3dmd2rt6dmain24mainUiPPaZi7runMainMFZv
(in /home/fburton/lang/d/guigl/glgui)
 ==3411==

 )
I guess I can't help you with that one. -- /Jacob Carlborg
Jun 11 2010
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Ferd Burton" <fredlburton gmail.com> wrote in message 
news:hurkuc$lc6$1 digitalmars.com...
 == Quote from Jacob Carlborg (doob me.com)'s article
 On 2010-06-09 21:16, Fred Burton wrote:
 Hi, I have (sort of) 2 questions:

 Background:
 I was doing some coding using Phobos, and recently switched to using 
 Tango.

 1. I'm trying to build using dsss and it says :
 /usr/bin/ld: cannot find -lphobos
 collect2: ld returned 1 exit status
 --- errorlevel 1
 Command /usr/bin/rebuild returned with code 65280, aborting.
 Error: Command failed, aborting.
You have to change your default rebuild configuration file. It's located in /etc/rebuild/default on Posix systems. Change the "profile" value to "dmd-posix-tango". Looking at the "dmd-posix" file, you can see, in the link section, that it explicitly links to "phobos" which is not necessary (at least not anymore). That's why you get the linker error.
Thanks. (trying...) okay, now it gives: /usr/bin/ld: cannot find -ltango-base-dmd collect2: ld returned 1 exit status --- errorlevel 1 Command /usr/bin/rebuild returned with code 65280, aborting. Error: Command failed, aborting. hmm... I have a /usr/lib/libtango-dmd.a editing dmd-posix-tango to go from cmd=dmd -L--start-group -L-ltango-base-dmd $i -of$o to cmd=dmd -L--start-group -L-ltango-dmd $i -of$o works! Now it seems to cleanly build with tango. It does still leak memory though ( ran for 4 minutes, 20 seconds and: ==3411== 237,749,649 bytes in 515,441 blocks are definitely lost in loss record 1,024 of 1,024 ==3411== at 0x4024918: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==3411== by 0x806D11C: gc_malloc (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8069670: _d_arrayappendcT (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8064F17: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa15__foreachbody24MFKAaZi (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8065013: _D5tango4text4Util20__T12PatternFructTaZ12PatternFruct7opApplyMFDFKAaZiZi (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8064EED: _D5tango4text4Util12__T5splitTaZ5splitFAaAaZAAa (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8065B9C: _D3flb3gui8wordwrap9word_wrapFAAafC3flb3gui9themebase10IStyleTextZAAa (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x80659BE: _D3flb3gui8somewind13ACustomWindow4drawMFC3flb3gui7guibase13Idraw_contextZv (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8063672: _D3flb3gui7guibase14window_manager4drawMFC3flb3gui7guibase13Idraw_contextZv (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x804A2C9: _D3flb3gui5glgui5GlGui3runMFZv (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x804A33B: _Dmain (in /home/fburton/lang/d/guigl/glgui) ==3411== by 0x8068133: _D2rt8compiler3dmd2rt6dmain24mainUiPPaZi7runMainMFZv (in /home/fburton/lang/d/guigl/glgui) ==3411== )
Can you see how much memory the OS is reporting that your app uses both right after your program starts versus after those four minutes? Also, try importing "tango.core.Memory" and then add this in your main loop: GC.collect(); // Run full collection cycle GC.minimize(); // Try to release some free memory back to the OS You won't want that in there normally, of course, but see if that changes your results. If it doesn't, then you may be having some false-pointer issues.
Jun 21 2010
parent Fred Burton <fredlburton gmail.com> writes:
when I run without valgrind of course, it runs faster so I don't need 4 minutes
...
in less than 1 minute, it went from ~ 64 Mbytes to ~ 400 Mbytes

--- trying with GC.collect() and GC.minimize() in main loop ... : Same result.

hmm..
Jun 22 2010
prev sibling parent Fred Burton <fredlburton gmail.com> writes:
Still having that apparent GC problem (with Tango on my machine), does anyone
have (some GC test code) that they
can recommend that I run so that I can confirm that my GC is / is not working?
Aug 10 2010