wormday commented on code in PR #949:
URL: https://github.com/apache/lucene/pull/949#discussion_r893267816
##########
lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java:
##########
@@ -191,15 +191,17 @@ public static int oversize(int minTargetSize, int
bytesPerElement) {
return newSize;
}
} else {
- // round up to 4 byte alignment in 64bit env
+ // round up to 4 byte alignment in 32bit env
switch (bytesPerElement) {
- case 2:
- // round up to multiple of 2
- return (newSize + 1) & 0x7ffffffe;
case 1:
- // round up to multiple of 4
- return (newSize + 3) & 0x7ffffffc;
+ // round up to multiple of 8 plus 4
Review Comment:
You're right
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]