File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes getting heap space error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "getting heap space error" Watch "getting heap space error" New topic

getting heap space error

anish chavan

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

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:
subject: getting heap space error
jQuery in Action, 3rd edition