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