Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic