> > > > OMG. Then we really need to discover what the gtk2 glue is doing so > > wrong. > > It's not just LCL-GTK2, the same thing happens with Lazarus > IDE compiled for LCL-Qt4 too. Just tested. Opening a blank > project, Lazarus IDE (using LCL-Qt4) uses 69MB already. Open > a 100 units and the memory usage jumps to 140MB. That's not > ever working with the IDE yet, so imaging what it would be at > the end of a normal working day. > >
Just ran a valgrind --massif --pages-as-heap=yes ./lazarus. Lazarus QT on kubuntu with 2G of memory, opening a small project (7 files). Without being an expert in the massif tool here is what it boils down to: Peak usage 165M divided into: 89M from dl-load 47M from /lib/dl.so which is the lazarus program itself (141M on disk ) 37M from the various grapics initialisation routines loading the QT libs 2M glib libraries loaded from QT remainder below ms_print's threshold. 20M KIconLoader (KPixmapCache) triggered by Qstyle::standardIcon from CONTROLS_TWINCONTROL_$_CREATEWND 20M SYSTEM_SYSOSALLOC <--- fpc memory management 8M SYSTEM_GETMEM_FIXED from 90 places 2M SYSTEM_GETMEM_VAR in IMGLIST_TCUSTOMIMAGELIST 2M SYSTEM_GETMEM_VAR in CODECACHE_TCODECACHE <--- here's codetools 8M from several places all below ms_print's threshold. 17M unknown 8M Qthread (allocatestack in pthread_create) triggered by LCLINTF_SETFOCUS 2M QFontEngine 6M allocated with brk/sbrk from several places all below ms_print's threshold. So, 50+% is program, resources and libraries. Codetools, which has been pointed to frequently, is peanuts. 20M in PixmapCache is enormuous. 17M unknown is a mistery. It's there from the first to the last massif sample at exactly the same size. The last 6M is interesting in that it continuously grows, compiling a project made it double but it never decreases, even when total memory usage dropped to 123M. This could be linked to the debugger having loaded symbols, etc. If somebody is interested I can attach the complete massif and/or ms_print output. Ludo -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus