gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz ./TODO doc/pegboard/buoydesign--tjl/peg.rst...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./TODO doc/pegboard/buoydesign--tjl/peg.rst...
Date: Thu, 30 Jan 2003 12:25:25 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        03/01/30 12:25:25

Modified files:
        .              : TODO 
        doc/pegboard/buoydesign--tjl: peg.rst 
        gfx/demo       : memoryleak.py 
        gfx/libcoords  : Coords.cxx 

Log message:
        FOUND IT\!

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.540&tr2=1.541&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/buoydesign--tjl/peg.rst.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/memoryleak.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.62&tr2=1.63&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.540 gzz/TODO:1.541
--- gzz/TODO:1.540      Wed Jan 29 16:35:38 2003
+++ gzz/TODO    Thu Jan 30 12:25:25 2003
@@ -94,6 +94,11 @@
        + get rid of non-random urn-5s in Ids!!!
        + fix the "nasty thing where a '<' should be a '<='" in linebreaker 
     mudyc:
+       - make the memory leak test proper:
+           - 1) set ulimits on the test running process always(!)
+             2) make it a test, run for 10000 iterations and check
+                that with the old code it will crash
+             3) update to new code and see it doesn't crash.
        - [PP] 
             - debug the memory leak.
            - fillets rendered too high; must be obscured by other buoys
Index: gzz/doc/pegboard/buoydesign--tjl/peg.rst
diff -u gzz/doc/pegboard/buoydesign--tjl/peg.rst:1.5 
gzz/doc/pegboard/buoydesign--tjl/peg.rst:1.6
--- gzz/doc/pegboard/buoydesign--tjl/peg.rst:1.5        Thu Jan 30 08:43:46 2003
+++ gzz/doc/pegboard/buoydesign--tjl/peg.rst    Thu Jan 30 12:25:25 2003
@@ -3,8 +3,8 @@
 =============================================================
 
 :Author:   Tuomas J. Lukka
-:Last-Modified: $Date: 2003/01/30 13:43:46 $
-:Revision: $Revision: 1.5 $
+:Last-Modified: $Date: 2003/01/30 17:25:25 $
+:Revision: $Revision: 1.6 $
 :Status:   Incomplete
 
 Goals: get the xupdf and pp functionality under one model.
@@ -109,7 +109,16 @@
     Anchor.c = DocFragmentAnchor.c + o;
     Link.c = TransclusionLink.c + o;
 
+Now, the picture gets clearer: the whole structure of the current buoy view
+can be *defined* by a single facade:
 
+.. UML:: BuoyviewFacade
+
+    class BuoyView
+
+    class BuoyViewScheme "interface"
+
+    dep "use" 
 
 
 
@@ -131,5 +140,5 @@
 
 Important Invariant (a la ZZstructure dimension): 
 if node A, anchor A.1 shows a link X to node B anchor B.4, 
-then after B.setFocus(B.4), node B will show the link X as well.
+hen after B.setFocus(B.4), node B will show the link X as well.
 
Index: gzz/gfx/demo/memoryleak.py
diff -u gzz/gfx/demo/memoryleak.py:1.3 gzz/gfx/demo/memoryleak.py:1.4
--- gzz/gfx/demo/memoryleak.py:1.3      Thu Jan 30 11:45:53 2003
+++ gzz/gfx/demo/memoryleak.py  Thu Jan 30 12:25:25 2003
@@ -23,13 +23,19 @@
        self.bgcolor = (0.5, 0.4, 0.7)
         putnoc(vs, background(self.bgcolor))
 
-        # Build 500 coordsys ;)
+        # Build a lot of *NON-INTERPOLATED* coordsys
         cs_a = vs.coords.affineCoordsys(0, 10, 1,1, 1, 0, 0, 1)
         for i in range(0,900):
-            cs_a = vs.translateCS(cs_a, "asdf"+str(i), 0,0,0)
+            cs_a = vs.coords.translate(cs_a, 0,0,0)
             
        # The next line causes the memory leak!!!!!!!!!!
+       # It makes the pointwise coordsys code path
+       # used.
         vs.matcher.add(cs_a, "A")
+
+       # If the previous line is replaced by this, i.e.
+       # non-recursed cs, no problems.
+       # cs_a = vs.translateCS(0, "A", 0,0,0)
 
        System.gc()
         # And again...
Index: gzz/gfx/libcoords/Coords.cxx
diff -u gzz/gfx/libcoords/Coords.cxx:1.62 gzz/gfx/libcoords/Coords.cxx:1.63
--- gzz/gfx/libcoords/Coords.cxx:1.62   Wed Jan 22 09:24:51 2003
+++ gzz/gfx/libcoords/Coords.cxx        Thu Jan 30 12:25:25 2003
@@ -239,11 +239,11 @@
 struct PointInterpCoordSys : public CoordSys {
     CoordSys *cs1, *cs2;
     float fract;
-    bool didGetMat;;
-    boostMat mat;
+    bool didGetMat;
+    float mat[16];
 
     PointInterpCoordSys(CoordSys *cs1, CoordSys *cs2, float fract)
-           : cs1(cs1), cs2(cs2), fract(fract), mat(4,4) { }
+           : cs1(cs1), cs2(cs2), fract(fract) { }
     virtual void setSuper(CoordSys **super) {
     }
     virtual void setParams(float *params) {
@@ -299,8 +299,7 @@
            for(int i=0; i<16; i++) DBG(dbg) << mat2[i] << " ";
            DBG(dbg) << "\n";
        }
-       for(int i=0; i<16; i++) mat.data()[i] = lerp(mat1[i], mat2[i], fract);
-       DBG(dbg) << mat;
+       for(int i=0; i<16; i++) mat[i] = lerp(mat1[i], mat2[i], fract);
 
 
        glPopMatrix();
@@ -314,7 +313,7 @@
        // XXX Allow using of vertex weighting or something
        if(!canPerformGL()) return false;
        getMat();
-       glMultMatrixf(mat.data().begin());
+       glMultMatrixf(mat);
        return true; 
     }
     CoordSys *createInverse() {
@@ -1313,6 +1312,8 @@
     CoordSet::CoordSet() : cs1_tmp(0), cs2_tmp(0) {
     }
     CoordSet::~CoordSet() {
+       clean();
+       DBG(dbg) << "Deleting coordset "<<this<<" "<<cs1_tmp<<" 
"<<cs2_tmp<<"\n";
        if(cs1_tmp) { delete cs1_tmp; cs1_tmp = 0; }
        if(cs2_tmp) { delete cs2_tmp; cs2_tmp = 0; }
     }
@@ -1363,6 +1364,7 @@
        DBG(dbg)  << "setroot\n";
        int lastIndSize = 1;
 
+       DBG(dbg) << "Removing tmps "<<this<<" "<<cs1_tmp<<" "<<cs2_tmp<<"\n";
        if(cs1_tmp) { delete cs1_tmp; cs1_tmp = 0; }
        if(cs2_tmp) { delete cs2_tmp; cs2_tmp = 0; }
 
@@ -1477,7 +1479,7 @@
            }
        nextInd:;
        }
-       DBG(dbg)  << "end\n";
+       DBG(dbg)  << "end: "<<cs1_tmp<<" "<<cs2_tmp<<"\n";
     }
 
     bool CoordSys::performGL() { 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]