[concurrency-interest] Unbounded blocking queues - memory consumption

Calum MacLean cnmaclean at hotmail.com
Fri Oct 7 08:08:45 EDT 2005


Hi

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,
Calum 





More information about the Concurrency-interest mailing list