Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Java application Memory Leak

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java application Memory Leak

    Hi All,
    I was running an java application in unix machines , during load for 20 hrs in last 5 hrs every 1 hour virtual memory is increasing by 2 MB though RES memory is stable so my friend is saying the application has memory leak..below is a hour wise load stat using top command. my question is 1.) whether increase in virtual memory means memory leak? 2.) Which column in top stats has to be considered for memory usage?.

    PID USER PR NI VIRT RES SHR S %CPU MEM TIME+ COMMAND
    15358 root 16 0 1237m 108m 8660 S 36 1.3 22:23.28 java -jar SCC.jar
    15358 root 16 0 1242m 114m 8660 S 38 1.4 45:50.99 java -jar SCC.jar
    15358 root 16 0 1245m 120m 8660 S 40 1.5 69:05.29 java -jar SCC.jar
    15358 root 16 0 1246m 115m 8660 S 42 1.4 92:14.87 java -jar SCC.jar
    15358 root 16 0 1251m 131m 8660 S 34 1.6 115:13.67 java -jar SCC.jar
    15358 root 16 0 1251m 117m 8660 S 40 1.4 138:25.46 java -jar SCC.jar
    15358 root 16 0 1251m 118m 8660 S 42 1.5 161:40.01 java -jar SCC.jar
    15358 root 16 0 1251m 120m 8660 S 36 1.5 184:22.90 java -jar SCC.jar
    15358 root 16 0 1251m 125m 8660 S 36 1.6 207:05.78 java -jar SCC.jar
    15358 root 16 0 1251m 114m 8660 S 36 1.4 229:45.79 java -jar SCC.jar
    15358 root 16 0 1251m 115m 8660 S 38 1.4 252:30.44 java -jar SCC.jar
    15358 root 16 0 1251m 115m 8660 S 38 1.4 275:28.83 java -jar SCC.jar
    15358 root 16 0 1251m 127m 8660 S 36 1.6 298:27.71 java -jar SCC.jar
    15358 root 16 0 1251m 116m 8660 S 38 1.4 321:23.06 java -jar SCC.jar
    15358 root 16 0 1252m 128m 8660 S 44 1.6 343:01.24 java -jar SCC.jar
    15358 root 16 0 1254m 116m 8660 S 28 1.4 363:40.06 java -jar SCC.jar
    15358 root 16 0 1256m 124m 8660 S 38 1.5 384:09.08 java -jar SCC.jar
    15358 root 16 0 1258m 137m 8660 S 38 1.7 404:35.57 java -jar SCC.jar
    15358 root 16 0 1260m 116m 8660 S 36 1.4 424:58.73 java -jar SCC.jar
    15358 root 16 0 1262m 125m 8660 S 36 1.5 445:28.48 java -jar SCC.jar
    15358 root 16 0 1264m 114m 8660 S 2 1.4 446:32.20 java -jar SCC.jar
    15358 root 16 0 1264m 113m 8660 S 0 1.4 446:34.64 java -jar SCC.jar
    15358 root 16 0 1264m 113m 8660 S 0 1.4 446:36.82 java -jar SCC.jar
    15358 root 16 0 1264m 113m 8660 S 0 1.4 446:38.95 java -jar SCC.jar
    15358 root 16 0 1264m 114m 8660 S 0 1.4 446:41.10 java -jar SCC.jar


    Regards,
    Prem


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    571
    My Mood
    Sleepy
    Thanks
    9
    Thanked 84 Times in 78 Posts

    Default Re: Java application Memory Leak


  3. The Following User Says Thank You to PhHein For This Useful Post:

    copeg (July 9th, 2013)

  4. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,608
    Thanks
    24
    Thanked 316 Times in 295 Posts

    Default Re: Java application Memory Leak

    It's one thing to assume a memory leak by looking at how the total memory increases, and it's another by looking at what specific type of memory is increasing.
    Try to get a report of your heap memory, divided between your Eden Space, Survivor Space, and Tenured Generation. This way you can get a better idea of what the garbage collector is doing.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. com.mysql.jdbc.JDBC4Connection suspected memory leak in java
    By newbie14 in forum JDBC & Databases
    Replies: 0
    Last Post: July 4th, 2013, 10:57 PM
  2. SImpeJDBCinsert leads to memory leak
    By justyStepi in forum JDBC & Databases
    Replies: 3
    Last Post: May 22nd, 2013, 11:26 AM
  3. Replies: 0
    Last Post: April 3rd, 2013, 09:17 PM
  4. [SOLVED] Memory usage increasing in while loop - is it a memory leak
    By mds1256 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 18th, 2012, 10:06 AM
  5. Out of memory work around for a java application (please help!)
    By javameanslife in forum Java Theory & Questions
    Replies: 5
    Last Post: January 22nd, 2010, 03:27 AM