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

Garbage collection can cause bad pointers.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.1.6
    • client-libs
    • None
    • generic
    • solaris_2.6

      Pointing to the middle of an object and not its beginning can be dangerous,
      because garbage collection can cause a Java object to move when it compacts
      the heap. This is especially dangerous for pointers to arrays.

      To avoid this, keep a pointer to the *start address* of a Java object, and
      call the KEEP_POINTER_ALIVE macro on the pointer.

      Also, see the following URL for more info:
        http://javaweb/~anandp/notes/ptralive/

      Also, see BugId 4084384 for more info.

            mbronsonsunw Mike Bronson (Inactive)
            mbronsonsunw Mike Bronson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: