This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

subset of LinketList

 
Suri Babs
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.
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 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?
 
Michael Morris
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic