Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about garbage collection logs

 
trupti nigam
Ranch Hand
Posts: 626
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am not sure if this is the right group to post my question.

In my applications garbage collection logs, I see below line.

2013-11-26T10:35:45.050-0500: 5195.298: [GC 5195.298: [DefNew: 17430K->456K(19136K), 0.0102408 secs] 796185K->779211K(2668480K), 0.0103687 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2013-11-26T10:36:10.593-0500: 5220.840: [GC 5220.840: [DefNew: 17480K->398K(19136K), 0.0100548 secs] 796235K->779153K(2668480K), 0.0101835 secs]

The last line seems half cut. Does that indicate that there is memory leak in my application? I have not seen the app throwing the out of memory error.

Please help.


Thanks,
Trupti
 
trupti nigam
Ranch Hand
Posts: 626
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no updates? IS this the right forum to ask Garbage collection related questions?
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, yes, this is the right forum.

I'm pretty sure that this is not an indication of a memory leak. The problem with memory leak is that the GC is not able to detect it. This is an intrinsic property of a memory leak - it is memory which is not used, but the GC cannot determine that the memory is not used. I'd say that if the GC could detect a memory leak, it could do something about it - either log the message much more prominently, or just reclaim the leaked memory outright.

If you're able to run your application for a long time without memory errors, you probably don't have a memory leak. You could have a memory leak which is constant in size (say, you keep a reference to a "big" object in a unused global variable somewhere), but since such memory leaks don't cause memory to run out, they are much less harmful that memory leaks which get bigger with time.
 
Winston Gutkowski
Bartender
Pie
Posts: 10254
59
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
trupti nigam wrote:The last line seems half cut. Does that indicate that there is memory leak in my application?

Fraid not. It could be something as simple as the fact that the reader is buffered, and that the last block is incomplete.

A simple flush() might correct it - or it might not - but at least you'll be sure that you read everything in the file.

Winston
 
Luan Cestari
Ranch Hand
Posts: 163
C++ Redhat Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Martin and Winston. I also think that could be just some internal code in the JVM that printed that way for some undocumented reason (like, maybe it couldn't get the system call measures in that time)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic