You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2021/03/28 00:46:18 UTC

[datasketches-memory] branch java-11-experimental updated: More comments in NioBits.

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch java-11-experimental
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git


The following commit(s) were added to refs/heads/java-11-experimental by this push:
     new e6cc765  More comments in NioBits.
e6cc765 is described below

commit e6cc765d6e9f22a45a0e047d8d458e355ee664c2
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sat Mar 27 17:45:54 2021 -0700

    More comments in NioBits.
---
 src/main/java/org/apache/datasketches/memory/NioBits.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/datasketches/memory/NioBits.java b/src/main/java/org/apache/datasketches/memory/NioBits.java
index f4e8867..c683491 100644
--- a/src/main/java/org/apache/datasketches/memory/NioBits.java
+++ b/src/main/java/org/apache/datasketches/memory/NioBits.java
@@ -73,6 +73,8 @@ final class NioBits {
           .getDeclaredMethod("unreserveMemory", long.class, int.class); //JD16 requires (long, long)
       NIO_BITS_UNRESERVE_MEMORY_METHOD.setAccessible(true);
 
+      //JDK 8-10: "count", "reservedMemory", "totalCapacity"
+      //JDK 11-16: "COUNT", "RESERVE_MEMORY", "TOTAL_CAPACITY"
       final Field countField = NIO_BITS_CLASS.getDeclaredField("COUNT");
       countField.setAccessible(true);
       nioBitsCount = (AtomicLong) (countField.get(null));

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org