Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4498246

JAWT_DrawingSurface lock/unlock() have memory leak and performance problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.4.0
    • client-libs
    • None
    • x86
    • windows_2000


      Java3D use JAWT_DrawingSurface lock/unlock() EVERY frame
      before drawing take place.

      Currently this function leak memory in native code
      as seen from the window task memory. A simple HelloUniverse
      demo from Java3D will run out of memory under JDK1.4
      after a while. Using JDK1.3.1 there is no such problem.
      Also, after I comment out the lock/unlock code
      in /j3d/src/native/sparc/ogl/DrawingSurfaceAWT.c
      (Java3D still works !) there is no memory leak when
      running JDK1.4

      Besides the leak, there is also a severe performance
      problem using it. The performance test program
      at
      /home/tlchung/j3dprogs/programs/other/IndexedGeomTest/GeomCoordIndexedOnlyTest

      shown that under JDK1.3.1 in my win2K machine with 2 CPU, Nvidia GeForce DDR
      it run at 485 fps.

      However using JDK1.4 beta3 (b78), the frame rate drop from 400->300->.
      ->100-> and eventually stabilize at 60fps after a while.

      If, however, I comment out the JAWT_DrawingSurface lock/unlock()
      in our code as mention above. The frame rate is same as JDK1.3.1.
      This indicate the performance problem also comes from it.

            mmartaksunw Michael Martak (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: