To solve the OutOfMemoryError in my Server Application. i have increased the maximum available heap size to 256 MB. And also i am logging the total and free memories periodically. When the total memory (Runtime.getRuntime().totalMemory()) reaches 100 MB. i am getting the OutOfMemoryError. It doesn't seems it is allocating more than 100MB for heap.
I have used the following switch to specify the max heap size
can any one throw a light on this?
java -Xms<some_min_size> -Xmx<some_max_size>
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
you need to set an initial heap size to the value that you want to support apart from the initial heap size.