David Dawes
dawes****@XFree*****
2003年 8月 16日 (土) 10:02:46 JST
On Sat, Aug 16, 2003 at 07:29:15AM +0900, Koike Kazuhiko wrote: >On 08/15/2003 09:23 PM, David Dawes wrote: >>>Index: xaaPCache.c >>>=================================================================== >>>RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v >>>retrieving revision 1.30 >>>diff -u -r1.30 xaaPCache.c >>>--- xaaPCache.c 25 Sep 2000 23:56:14 -0000 1.30 >>>+++ xaaPCache.c 15 Aug 2003 02:18:24 -0000 >>>@@ -763,6 +763,7 @@ >>> 1) Don't take up more than half the memory. >>> 2) Don't bother if you can't get at least four. >>> 3) Don't make more than MAX_512. >>>+ 4) Don't have any of there are no 256x256s. >>> >>> 256x256 - >>> 1) Don't take up more than a quarter of the memory enless there >>>@@ -785,6 +786,13 @@ >>> if(!Target512) Target256 = ntotal >> 3; >>> else Target256 = ntotal >> 4; >>> if(Target256 < 4) Target256 = 0; >>>+ >>>+ if(Num512 && !Num256) { >>>+ while(Num512 && Num256 < Target256) { >>>+ SubdivideList(&List512, &List256); >>>+ Num256 += 4; Num512--; >>>+ } >>>+ } >>> >>> if(!Num512) { /* no room */ >>> } else if((Num512 < 4) || (!Target512)) { >> >> >> >> It occurred to me this morning that 'if(Num512 && !Num256)' needs to >> be 'if(Num512 && Num256 < 4)'. The case that was reported had Num256 >> initially 3, not 0. >> >> David > >I applied your patch. That seems to work fine. My X doesn't crash. Thanks for the feedback and for the report and debugging information. I'll commit the fix. David -- David Dawes Founder/committer/developer The XFree86 Project www.XFree86.org/~dawes