Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!rchland.ibm.com!tinglett+ From: tinglett+@rchland.ibm.com (Todd Inglett) Newsgroups: comp.soft-sys.andrew Subject: Re: Help and its memory usage behavior Message-ID: Date: 20 Mar 90 16:48:49 GMT References: <8a1H9Qj0_csm00tkcv@icase.edu> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Organization: The Internet Lines: 49 Excerpts from ext.cmu.info-andrew: 19-Mar-90 Re: Help andits memory usa.. Tom Crockett@RCHGATE.rch (1550+0) > I think there is another memory leak in Andrew as well. Try > thefollowing scenario: > Sun 4/60, SunOS 4.0.3c > X11R4 + fixes 1-5 compiled w/ "cc -O" > Andrew + patches 001-003 compiled w/ "cc" > (1) Start Xsun (via xinit or whatever -- I usexdmshell) > (2) Start console with lots of dynamic stuff in it (loadgraphs, etc.) > (3) Use "pstat -T" to look at memory usage for the Xsunserver > (4) Start xlock and let it run for several hours > (5) Look at "pstat -T" again. The server has grown considerably. This is interesting, because I have seen it as well on an RT running AIX andBSD. Ordinary screen blanking also causes the leak. I have spent many hoursof my spare time to track it down and I am getting close, but I don't know theserver that well. Perhaps someone at MIT would care to help? The problem seems to be in the backing store code (mibstore.c). If you runyour server with -bs (no backing store) you will find that it does not consumememory. I have tracked the leak down to line 3199 of mibstore.c: if(pWindowPriv->pBackingPixmap->drawable.serialNumber != pBackingGC->serialNumber) { ValidateGC((DrawablePtr)pWindowPriv->pBackingPixmap, pBackingGC); } The ValidateGC winds up calling miBSCheapValidateGC (seems odd) which inturn calls the device specific validate (in my case apa16ValidateGC). Myapa16ValidateGC calls miRegionCreate to create the clipping region for the GC. Each time this validate happens (on line 3199), this clipping region getsreallocated and nobody seems to be getting rid of the old region. I put in code to track all regions created by the server and found the sameclipping region (described above) allocated thousands of times!! By the way,the code in apa16ValidateGC is virtually identical to mfbValidateGC, so Ithink there are many (perhaps all) servers with this problem. Anyone out there ever work on the backing store code? -todd inglett