You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "blerer (via GitHub)" <gi...@apache.org> on 2023/07/17 08:52:01 UTC

[GitHub] [cassandra] blerer commented on a diff in pull request #2488: CASSNDRA-18329: Upgrade Jamm

blerer commented on code in PR #2488:
URL: https://github.com/apache/cassandra/pull/2488#discussion_r1265059362


##########
src/java/org/apache/cassandra/utils/ObjectSizes.java:
##########
@@ -105,15 +98,12 @@ public static long sizeOfReferenceArray(int length)
      */
     public static long sizeOfArray(Object[] objects)
     {
-        if (objects == null)
-            return 0;
-
-        return sizeOfReferenceArray(objects.length);
+        return meter.measureArray(objects);
     }
 
-    private static long sizeOfArray(int length, long elementSize)
+    private static long sizeOfArray(int length, int elementSize)

Review Comment:
   The biggest element size if 8. So even byte would work here. :-) 



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org