1 Reply Latest reply: Jan 21, 2008 11:06 AM by alanb RSS

    [HELP]  How to see what objects are in which part of heap?

    843810
      Hi,

      Would anyone please tell me how to see what objects are in which part of heap?
      for example: object 1 is in the old generation, object 2 is in the young generation

      thank you very much!
        • 1. Re: [HELP]  How to see what objects are in which part of heap?
          alanb
          A good place to start is the demo directory of your JDK installation. One of the examples is the heapViewer demo that demonstrates the APIs to iterate over the objects in the heap. Note that there isn't anything in the API that is specific to generational collectors so you won't find functions that tell if the objects are in the young or other generation.