[crossfire] Valgrind results

Andreas Kirschbaum kirschbaum at myrealbox.com
Sat Mar 26 15:04:44 CST 2005


Alex Schultz wrote:
>
     
      Ah... so most of this leakage likely is the combination of both bugs:
     
     >
     
      the server keeps sending face 0 over and over, that counts to the
     
     >
     
      client as a face update, and each time face 0 is sent, the old face 0
     
     >
     
      (which is exactly the same anyways) isn't freed properly. Is that
     
     >
     
      correct?
     
     
Yes, that is the problem.


>
     
      I also seem to be seeing the X memory usage increasing alot with CF,
     
     >
     
      which appears to be upstream leaks triggered by cfclient. As I
     
     >
     
      understand, the leaks in X itself aren't being tracked by valgrind as
     
     >
     
      that memory isn't owned by cfclient, and running all of X in valgrind
     
     >
     
      would be impractically slow. So exactly why cf is causing X itself to
     
     >
     
      leak may be more difficult to track down.
     
     
I don't think the X server itself has a memory leak. The problem is that
the crossfire client requests many X resources which makes the X server
allocate memory. And because the client leaks the old handles when
allocating a new resources, the X server itself cannot free the old
resources until the client exits.

After the crossfire client exits, these resources are freed by the X
server. But as far as I know, the (virtual) memory usage of an Unix
processes normally does not shrink. Therefore the X server's memory
usage does not shrink after the crossfire client exits.

    
    


More information about the crossfire mailing list