On Wed, Jul 24, 2002 at 11:54:52AM +1000, Cameron Simpson wrote: > On 11:05 09 Jul 2002, Dominik Vogt <fvwm@fvwm.org> wrote: > | On Tue, Jul 09, 2002 at 12:51:01AM -0500, David Fries wrote: > | > Speaking of memory usage, has anyone thought about looking for some > | > memory leaks? > | Yes, we regularly run Purify or a similar tool before major > | releases. In the mean time I frequently use efence to detect > | other memory problems. > [...] > | Unfortunately, the information about memory usage that top shows > | has little to do with the real memory consumtion. Chances are > | good that you didn't see a memory leak at all. > [...] > > Maybe a better question is: Dominik, what FVWM features consume memory, > and at vaguely what rate? I mean here, statements like "a backdrop > image for a menu will cost you XxYx(native X11 bytes-per-pixel)" * > "per menu"/"per use"/"per ...". Little rules of thumb like that, not so > much to locate leaks but to give the byte-thrifty user an idea of how > much penatly they're incurring with their decorations/styles etc.
Roughly, - a few hundred bytes per window, per style name and per menu style name - the size of the strings in menu entries and function actions - the size of the pictures and gradients used (width x height x depth / 8) - about 20 to 50 bytes for each structure that is used (colour sets, menus, vectors, bindings, buttonstyles, titlestyles, borderstyles, function The only interesing things to watch are windows, styles that are issued in the 'wrong' order and growing menus or functions. The wrong order of specifying styles is this: Style * A, B Style X B, C Style * A, notB Style X B, notC Fvwm tries to merge new styles together if possible. In this case, nothing can be merged because adjacent styles with different names override style B. If one had issued Style * A, B Style * A, notB Style X B, C Style X B, notC The list would have been merged to Style * A, notB Style X B, notC thus saving half the memory. This can be a problem if you use some scripts or complex functions to change fvwm's behaviour or the used theme at run time. If done wrong, the stlye list can grow beyond limits. Bye Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] -- Visit the official FVWM web page at <URL: http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]