[xmonad] Profiling XMonad
Alejandro Serrano Mena
trupill at gmail.com
Mon Jun 14 03:40:46 EDT 2010
2010/6/13 Don Stewart <dons at galois.com>
> > Hello,
> > I'm trying to allow RGB images as buttons in XMonad. It's alreasy
> working, but
> > now XMonad leaks a lot of memory (each time you change focus about 1 or 2
> > megabytes are taken from memory), so when a little time passes, it
> > unusable. I'd like to ask for help profiling or with any other thing that
> > help me solve this problem.
> > As of now, I'm saving the images as String. Then, using
> > Foreign.C.String.newCAString, I convert it to a CString, which is what
> > expects. After that, I create a Image using XCreateImage, which I paint
> > XPutImage. Finally, I call XDestroyImage to free the memory. So, as far
> as I
> > know, no leak should be possible :(
> You should recompile xmonad with --enable-executable-profiling
> and then run it with +RTS -p
> This will create a .prof file that will tell you what is allocating.
> For even clearer understanding, use heap profiling, which will
> graphically display what is being allocated and where.
Thanks very much. Just one more question: do I have to change anything when
compiling xmonad and xmonad-contrib, or just use those arguments when
calling 'xmonad --recompile'?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xmonad