Young-Leo commented on code in PR #16882:
URL: https://github.com/apache/iotdb/pull/16882#discussion_r2619668869


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/read/resp/info/impl/ShowDevicesResult.java:
##########
@@ -137,4 +139,24 @@ public boolean equals(final Object o) {
   public int hashCode() {
     return Objects.hash(path, isAligned, templateId);
   }
+
+  @Override
+  public long ramBytesUsed() {
+    long size = 
RamUsageEstimator.shallowSizeOfInstance(ShowDevicesResult.class);
+    if (path != null) {
+      size += RamUsageEstimator.sizeOf(path);
+    }
+    if (isAligned != null) {
+      size += RamUsageEstimator.shallowSizeOfInstance(Boolean.class);

Review Comment:
   The boolean atomic class is one byte, while the wrapper class Boolean is 
not. After testing, the wrapper class Boolean is 16 bytes.



-- 
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]

Reply via email to