[Lazarus] RE : RE : Console App Development

Ludo Brands ludo.brands at free.fr
Sat Aug 13 12:22:26 CEST 2011


> 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:

The same for the 450 univint files:

Peak usage 288M (450 files use 20M on disk):
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
107M SYSTEM_SYSOSALLOC						<--- fpc
memory management
	35M SYSTEM_SYSGETMEM_FIXED	
		15M SOURCEEDITOR
		11M from 167 places below threshold
		6M from CLASSES_TCOLLECTION ADD COLLECTIONITEM (from
SOURCEEDITOR_TSOURCEEDITOR)
		various smaller blocks in SYNEDIT, EDITOROPTIONS, SYSUTILS,
... 
	70M SYSTEM_SYSGETMEM_VAR  
		30M from  CODECACHE_TCODECACHE   
		6M from ZINFLATE_INFLATEINIT called from
GRAPHICS_CREATEBITMAPFROMLAZARUSRESOURCE
		17M from LCONVENCODING_ISO_8859_1TOUTF8 from
CODECACHE_TCODECACHE DECODELOADED
		3M from IMGLIST_TCUSTOMIMAGELIST
		3M from CODECACHE_TCODEBUFFER LOADFROMFILE
		1M from GRAPHICS_TCUSTOMICON LOADFROMRESOURCEHANDLE
		1M from GRAPHICS_CREATEBITMAPFROMLAZARUSRESOURCE
	      remainder from several places
17M unknown 							
25M Qthread (allocatestack in pthread_create) 
	8M triggered by LCLINTF_SETFOCUS 
	8M by clone.S
	9M by g_main_context_iteration
15M GIMAGE:paintEngine from synedit
2M QFontEngine 
2M KMimeType from QFileDialog
8M allocated with brk/sbrk 
  	3M Qimage_paintEngine from LCLINTF_DELETEOBJECT    <----  ????
  	remainder from several places all below ms_print's threshold. 



Bad news is that peak memory is reached after closing all files and opening
a new small project (2 files in editor).

Ludo
 





More information about the Lazarus mailing list