[concurrency-interest] Unbounded blocking queues - memory
cnmaclean at hotmail.com
Fri Oct 7 08:08:45 EDT 2005
My application is producing a large unbounded quantity of objects which are
being put into a BlockingQueue for consumption by some other thread.
I'm currently using LinkedBlockingQueue, as it's unbounded.
However, I'm seeing that the LinkedBlockingQueue.Node objects take up a fair
bit of memory - around about 16 bytes each according to my profiler.
So, while I'm not 100% sure, I'm a bit worried about the memory consumption,
as it's a large number of objects which are being produced.
Are there any other alternatives for unbounded BlockingQueue implementations
which maybe take up less memory than LinkedBlockingQueue?
Thanks for your help,
More information about the Concurrency-interest