• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting heap space error

anish chavan
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic