OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Greg Pringle on January 08, 2016, 02:24:32 pm

Title: Memory issues in Java
Post by: Greg Pringle 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.
Title: Re: Memory issues in Java
Post by: Michaelhz on January 08, 2016, 09:43:01 pm
Have you ever openend a ticket at svn.netlabs.org/Java ?
Title: Re: Memory issues in Java
Post by: Greg Pringle 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.