How to check memory size allocated to JVM?

Discussion in 'Java' started by Laura Heinzmann, Feb 16, 2005.

  1. Hi:

    Is there a way I can check the memory size allocated to a JVM?

    LH
    Laura Heinzmann, Feb 16, 2005
    #1
    1. Advertising

  2. Laura Heinzmann

    John McGrath Guest

    On 2/15/2005 at 9:55:06 PM, Laura Heinzmann wrote:

    > Is there a way I can check the memory size allocated to a JVM?


    See the Runtime class, freeMemory(), maxMemory() & totalMemory() methods.
    Note that the totalMemory() value will generally not match what is shown
    by operating system utilities such as the Windows task manager or the *nix
    ps command. I think that is based on the amount of memory that the JVM
    has malloc'd, and does not include code space, static data, etc.

    --
    Regards,

    John McGrath
    John McGrath, Feb 16, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    616
    Matt Wharton
    Dec 9, 2004
  2. mandark_br

    Size of Allocated Memory

    mandark_br, May 6, 2004, in forum: C Programming
    Replies:
    3
    Views:
    560
    Alex Monjushko
    May 6, 2004
  3. NewToCPP
    Replies:
    5
    Views:
    605
    Mike Wahler
    Dec 8, 2005
  4. Shivanand Kadwadkar
    Replies:
    83
    Views:
    4,769
    Keith Thompson
    Jan 8, 2011
  5. Gene
    Replies:
    0
    Views:
    446
Loading...

Share This Page