-
Notifications
You must be signed in to change notification settings - Fork 152
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw exception 'Capacity must be a power of two' #282
Comments
version: 0327e3f |
Hey, can you provide more details please. |
I think you are explicitly changing the queue size to a non power of 2 in order to get this error, i do not see any other way of getting it. I made a PR that will automatically round it up to the next power of 2 |
I didn't explicitly changing the queue size. That happened occasionally. |
Thanks for reporting. It is difficult to figure out why it happened. I have improved the exception message and also now always rounding up to the nearest power of 2. It shouldn't happen again after this commit, but if it does please let me know |
Please use 57f8104 It seems that the queue grew above 2.1 gb in your case |
How did it happen? |
In the version you are using capacity can overflow
It needs to be capped to the max power of 2 we can represent with a uint32_t that is 2^31 later comits were caping it to uint32_t::max() which was also wrong and not a power of 2 |
The text was updated successfully, but these errors were encountered: