aspose file tools
The moose likes Java in General and the fly likes getting heap space error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "getting heap space error" Watch "getting heap space error" New topic
Author

getting heap space error

anish chavan
Greenhorn

Joined: Sep 30, 2012
Posts: 1
problem defination

Programming language is restricted to Java.
have one disk and memory usage is limited to 5 MB.
Each group has to develop an application which sorts the numbers in ascending order.
Your application should work with data of any size.
You need to define your own input and output buffer size, and the number of buffers.
You are free to choose your sorting algorithm.
Execution time is important. All of the projects will be run on the same computer, and your mark will depend on the execution time.
At the end of sorting, program needs to show the execution time and needs to produce an output file that includes the sorted numbers.

i am trying to execute this programme it runs good with normal memory with little bit problem in final sorted file not showing the tenth number .but when restriction are added the main array list gives me the error of heap size

and unable to execute.

can any one suggest any way to avoid array list from going out ot of heap




error
at java.util.Arrays.copyOf(Unknown Source)
at java.util.Arrays.copyOf(Unknown Source)
at java.util.ArrayList.ensureCapacity(Unknown Source)
at java.util.ArrayList.add(Unknown Source)



 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: getting heap space error
 
Similar Threads
How a character save in 2 bytes in Java?
Please help!
how to read from a file ?
Inrospection using Reflection
java.nio.ByteBuffer to StringBuffer