You are here

Where Has All the Memory Gone

Gentoo and Xine dev (and part-time "Amarok Helper") Diego wrote an interesting blog about memory usage. Or, at least interesting to folks like me who somewhat regret never having had a operating systems class. He discovered that any Xine client (which includes Dragon Player or any KDE4 app that makes a sound) wastes 1.7mb of RAM thanks to libvorbisenc.

Using his cowstats script, I profiled Dragon Player:

File name | .data size | .bss size | .data.rel.* size
src/app/CMakeFiles/dragon.dir/playDialog.o 0 1 0
src/app/CMakeFiles/dragon.dir/videoWindow.o 0 17 0
src/app/CMakeFiles/dragon.dir/mainWindow.o 0 17 0
src/app/CMakeFiles/dragon.dir/actions.o 0 1 0
src/app/CMakeFiles/dragon.dir/playlistFile.o 0 1 0
src/app/CMakeFiles/dragon.dir/fullScreenToolBarHandler.o 0 1 0
src/app/CMakeFiles/dragon.dir/stateChange.o 0 1 0
src/app/CMakeFiles/dragon.dir/theStream.o 8 9 0
src/app/CMakeFiles/dragon.dir/fullScreenAction.o 0 1 0
src/app/CMakeFiles/dragon.dir/main.o 0 8 0


Not too shabby. :-) Also not so important, Dragon Player isn't a library. I just profiled libamarok which is loaded by all the various Amarok plugins so potentially could be an issue. It had 46k copy-on-write sections total, but out of the dozens of files 40k is a variable in the crashhandler, which is a kind of scary piece of code since it has to work while the rest of Amarok is crashing. So I'll let someone else work on that. ;-)