You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result was 256 B which is wrong. It should have been 1099511627776 B
After investigating this problem, I can see that the left shift operation doesn't produce the desired results due to overflow. It results in a 32 bit integer.
I was writing unit tests for my functions that rely on this awesome library and found a serious problem with memory unit conversions.
Here is a complete code example
The result was
256 B
which is wrong. It should have been1099511627776 B
After investigating this problem, I can see that the left shift operation doesn't produce the desired results due to overflow. It results in a 32 bit integer.
The text was updated successfully, but these errors were encountered: