• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

subset of LinketList  RSS feed

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Client(Socket) and Server(ServerSocket) running. Server will contnously give the data to the Client and Client will add the data to the LinkedList.
My thread should get the subset of LinkedList, assign it to List (after every "n" seconds) and simultaneously remove the same subset of contents from the linked list.
Iam able to get the subset of data, but when i try to remove, the same subset of data from the Orignal LinkedList, iam getting OutOfMemoryErrorContents Exception.
Could any help in solving this problem.
 
Ranch Hand
Posts: 1067
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your code ensure that no more than one thread is working on the linked list at any given time?
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Suri,
You need to post the code that is causing the Error. Most likely something is attempting to allocate more memory than is availble in that code.
Michael Morris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!