• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

getting heap space error

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)

My honeysuckle is blooming this year! Now to fertilize this tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic