netudima commented on code in PR #3936:
URL: https://github.com/apache/cassandra/pull/3936#discussion_r1973194998


##########
src/java/org/apache/cassandra/db/rows/NativeCell.java:
##########
@@ -194,20 +195,20 @@ public long unsharedHeapSizeExcludingData()
 
     public long offHeapSize()
     {
-        long size = offHeapSizeWithoutPath(MemoryUtil.getInt(peer + LENGTH));
+        long size = offHeapSizeWithoutPath(NativeEndianMemoryUtil.getInt(peer 
+ LENGTH));
         if (hasPath())
-            size += 4 + MemoryUtil.getInt(peer + size);
+            size += 4 + NativeEndianMemoryUtil.getInt(peer + size);
         return size;
     }
 
     private boolean hasPath()
     {
-        return MemoryUtil.getByte(peer+ HAS_CELLPATH) != 0;
+        return MemoryUtil.getByte(peer + HAS_CELLPATH) != 0;

Review Comment:
   I was not sure here, for one side - yes, it is better for consistency point 
of view, for another side I wanted to highlight that byte operations are endian 
agnostic..  I will switch to NativeEndianMemoryUtil usage



-- 
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-unsubscr...@cassandra.apache.org

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


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

Reply via email to