aspose file tools*
The moose likes Beginning Java and the fly likes subset of LinketList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "subset of LinketList" Watch "subset of LinketList" New topic
Author

subset of LinketList

Suri Babs
Ranch Hand

Joined: Mar 27, 2003
Posts: 50
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

Joined: Mar 16, 2001
Posts: 986

Does your code ensure that no more than one thread is working on the linked list at any given time?


Please ignore post, I have no idea what I am talking about.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
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


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: subset of LinketList