Author Topic: Memory issues in Java  (Read 1246 times)

Greg Pringle

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 77
    • View Profile
Memory issues in Java
« on: January 08, 2016, 02:24:32 pm »
I have been a java programmer since 1997 and used IBM Java 1.3 for OS/2 with good success. It is hard to crash. On the other hand the current Java 1.6 is easy to crash and even bring down the whole system. All you need to do is fill up memory with a series of threads holding vectors. There is no warning to the doom. I found this because I had some bad code which would store arrays in vectors with cross pointers to the arrays so the vectors would not actually leave memory after closing the thread holding the vector. (a nasty memory leak) On other systems (not OS/2) the results were an eventual hang of java. On OS/2 the results were a crash of Java and sometimes a crash of the system. At least now I have a test bed for leaks.



Michael Holzapfel

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 47
    • View Profile
Re: Memory issues in Java
« Reply #1 on: January 08, 2016, 09:43:01 pm »
Have you ever openend a ticket at svn.netlabs.org/Java ?

Greg Pringle

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 77
    • View Profile
Re: Memory issues in Java
« Reply #2 on: January 12, 2016, 11:55:57 am »
Some time ago I sent in a trouble ticket but did not provide enough information for any action. Since then I have heard that there is a problem with high memory usage. I think the crashing problem might be due to the high memory issue. I was waiting to see if there was an improvement in memory management before going further on the crash issue. In the mean time I put into production a few server programs written for java 1.6 and they seem to be running stable since I fixed the leaks. It can be challenging to determine when there is a real leak or just memory buffering done by OS/2.
« Last Edit: January 12, 2016, 11:59:28 am by Greg Pringle »