Why is the boost lockfree size is fixed to 65535 objects?
typedef boost::lockfree::queue<int, boost::lockfree::fixed_size<true>> MyQueue;
MyQueue queue(1024*100);
The above code throws exception.
the reasoning i find in the code is that array-based freelists only support a 16bit address space.
what is the reason for this? i am using it on 64bit linux machine. then why limit the addressing to 2**16 items? does the queue use a 'short int' for indexing? does atomic instructions only work for 16bit word size?
what should i do to have a fixed sized queue with more capacity than this?
unsigned short
, maybe it has something to do with that – Fernyak