Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ora!bloom-beacon!dont-send-mail-to-path-lines From: nazgul@alfalfa.COM (Kee Hinckley) Newsgroups: comp.windows.x Subject: Translations, Resources and Storage Leaks Message-ID: <9103140445.AA01983@alfalfa.com> Date: 14 Mar 91 04:45:07 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 42 On and off I have seen people mention things like this on the Motif list, but I've never seen anyone able to nail it down. I'm going to briefly describe the symptoms and I'd like to hear if anyone has any ideas what might be going on. We have an application that creates and destroys widgets on a common basis. A typical sequence involves the destruction and recreation of half a dozen text widgets, a table, a two scrolled windows and a couple paned windows. (Yes we should do a better job of cacheing, but anyway...) Occasionally we start seeing massive storage leaks, on the order of 200K a shot. 2K I could live with, but 200K is not going to cut it. I expect this sequence to occur hundreds of times a day! What we have seen. o It seems like Motif is installing a lot more translations when this happens. Looking at the Motif code I see several places where translations are installed (augmented) only if the widget currently has translations - otherwise it waits. So I suspect that for some reason it thinks that they do. Or maybe it has something to do with traversal - another place translations are installed. I really don't know, and we haven't had a chance to explore this avenue too far yet. o The leakage is dependant on the contents of the .Xdefaults/.Xresources file. But it isn't dependant on any particular resource, or even one that has anything to do with the application. We can cut the resource file in half, and use either half and we get no leakage. But if we use the whole file, it leaks. If we cut it down line by line at some point we cross a threshold and it stops. If we take the resource definition we just deleted and make it some bogus definition "foo.bar: asdf", it doesn't matter - we still get the leakage. All of this makes us suspect that there is some boundary condition in resource handling that causes something to be reallocated or something to change behavior - but we haven't been able to find it. Does anyone have the vaguest idea what might be going on here? Or how we might track it down? -kee