Initial commit using Eclipse & Maven
diff --git a/README.md b/README.md
index b93654f..b3a8f6b 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,26 @@
-# DataSketches Memory 16
\ No newline at end of file
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# DataSketches Memory 16
+
+Experimental and temporary development of Memory based on JDK 16.
+
+See [demo-jpms-monitor](https://github.com/nipafx/demo-jpms-monitor).
+
+
diff --git a/compile.sh b/compile.sh
new file mode 100755
index 0000000..f556534
--- /dev/null
+++ b/compile.sh
@@ -0,0 +1,43 @@
+#!/bin/bash -e
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#Java executables for mac environment
+export JAVAC=$JAVA16_HOME/bin/javac
+export JAR=$JAVA16_HOME/bin/jar
+export JAVA=$JAVA16_HOME/bin/java
+
+echo "--- CLEAN & COMPILE ---"
+
+rm -rf target
+mkdir target
+mkdir target/classes
+mkdir target/mods
+mkdir target/test-classes
+
+$JAVAC \
+    -d target/classes/\
+    $(find . -name '*.java')
+
+echo "--- JAR ---"
+$JAR \
+    --create \
+    --file target/mods/org.apache.datasketches.memory.jar \
+    --main-class org.apache.datasketches.memory.AllocateDirect \
+    -C target/classes .
+
diff --git a/dry-run.sh b/dry-run.sh
new file mode 100755
index 0000000..597f2ca
--- /dev/null
+++ b/dry-run.sh
@@ -0,0 +1,31 @@
+#!/bin/bash -e
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#Java executables for mac environment
+export JAVAC=$JAVA16_HOME/bin/javac
+export JAR=$JAVA16_HOME/bin/jar
+export JAVA=$JAVA16_HOME/bin/java
+
+echo "--- DRY RUN ---"
+
+$JAVA \
+    --module-path target/mods \
+    --dry-run \
+    --module org.apache.datasketches.memory
+
diff --git a/pom.xml b/pom.xml
index 29103c0..b95de49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,8 @@
 -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
@@ -81,16 +82,9 @@
   </developers>
 
   <properties>
-    <!-- UNIQUE FOR THIS JAVA COMPONENT -->
-    <slf4j-api.version>1.7.30</slf4j-api.version>
-    <slf4j-simple.version>1.7.30</slf4j-simple.version>
-    <protobuf-java.version>3.6.0</protobuf-java.version>
-    <!-- Used for UTF8 testing -->
-    <zero-allocation-hashing.version>0.8</zero-allocation-hashing.version>
-    <!-- END:UNIQUE FOR THIS JAVA COMPONENT -->
 
     <!-- Test -->
-    <testng.version>7.1.0</testng.version>
+    <testng.version>7.4.0</testng.version>
 
     <!-- System-wide properties -->
     <maven.version>3.5.0</maven.version>
@@ -120,6 +114,7 @@
     <maven-remote-resources-plugin.version>[1.7.0,)</maven-remote-resources-plugin.version> <!-- overrides parent -->
     <maven-source-plugin.version>3.2.1</maven-source-plugin.version> <!-- overrides parent -->
     <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version> <!-- overrides parent -->
+    <maven-toolchains-plugin.version>3.0.0</maven-toolchains-plugin.version>
     <!-- Apache Plugins -->
     <apache-rat-plugin.version>0.13</apache-rat-plugin.version> <!-- overrides parent -->
     <!-- org.jacoco Maven Plugins -->
@@ -128,7 +123,7 @@
     <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
     <!-- other -->
     <lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
-    <git-commit-id-plugin.version>4.0.0</git-commit-id-plugin.version>
+    <git-commit-id-plugin.version>4.0.4</git-commit-id-plugin.version>
   </properties>
 
   <repositories>
@@ -157,34 +152,6 @@
   </repositories>
 
   <dependencies>
-    <!-- UNIQUE FOR THIS JAVA COMPONENT -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>${slf4j-api.version}</version>
-    </dependency>
-    <!-- Test Scope -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j-simple.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <!-- Used for UTF8 testing -->
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-      <version>${protobuf-java.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <!-- Used for xxHash testing -->
-      <groupId>net.openhft</groupId>
-      <artifactId>zero-allocation-hashing</artifactId>
-      <version>${zero-allocation-hashing.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <!-- END: UNIQUE FOR THIS JAVA COMPONENT -->
 
     <!-- Test Scope -->
     <dependency>
@@ -198,11 +165,13 @@
   <build>
     <pluginManagement>
       <plugins>
+
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>versions-maven-plugin</artifactId>
           <version>${versions-maven-plugin.version}</version>
         </plugin>
+
         <plugin>
           <!-- We want to deploy the artifacts to a staging location for perusal -->
           <!-- Apache Parent pom: apache-release profile -->
@@ -210,12 +179,14 @@
           <artifactId>maven-deploy-plugin</artifactId>
           <version>${maven-deploy-plugin.version}</version>
         </plugin>
+
         <plugin>
           <!-- Apache Parent pom, pluginManagement-->
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
           <version>${maven-release-plugin.version}</version>
         </plugin>
+
         <plugin>
           <!-- Extends Apache Parent pom, pluginManagement-->
           <groupId>org.apache.maven.plugins</groupId>
@@ -238,6 +209,7 @@
             </execution>
           </executions>
         </plugin>
+
         <plugin>
           <!-- Extends Apache Parent pom, apache-release profile -->
           <groupId>org.apache.maven.plugins</groupId>
@@ -255,6 +227,7 @@
             </execution>
           </executions>
         </plugin>
+
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-enforcer-plugin</artifactId>
@@ -275,7 +248,7 @@
                   </requireMavenVersion>
                   <bannedDependencies>
                     <excludes>
-                      <!--LGPL licenced library-->
+                      <!--LGPL licensed library-->
                       <exclude>com.google.code.findbugs:annotations</exclude>
                     </excludes>
                   </bannedDependencies>
@@ -285,6 +258,7 @@
             </execution>
           </executions>
         </plugin>
+
         <plugin>
           <!-- Apache Parent pom, pluginManagement-->
           <groupId>org.apache.rat</groupId>
@@ -313,6 +287,7 @@
             </excludes>
           </configuration>
         </plugin>
+
         <plugin>
           <!-- Extends Apache Parent pom, apache-release profile -->
           <groupId>org.apache.maven.plugins</groupId>
@@ -335,6 +310,7 @@
             </execution>
           </executions>
         </plugin>
+
         <plugin>
           <!-- Apache Parent pom, pluginManagement-->
           <groupId>org.apache.maven.plugins</groupId>
@@ -344,15 +320,28 @@
             <trimStackTrace>false</trimStackTrace>
             <useManifestOnlyJar>false</useManifestOnlyJar>
             <redirectTestOutputToFile>true</redirectTestOutputToFile>
-            <argLine>
-              --add-opens java.base/java.nio=ALL-UNNAMED
-              --add-opens java.base/java.lang=ALL-UNNAMED
-              --add-opens java.base/jdk.internal.misc=ALL-UNNAMED
-              --add-opens java.base/jdk.internal.ref=ALL-UNNAMED
-              --add-opens java.base/sun.nio.ch=ALL-UNNAMED
-            </argLine>
+<!--        <argLine>
+              - -add-modules jdk.incubator.foreign
+            </argLine> -->
           </configuration>
         </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-toolchains-plugin</artifactId>
+          <version>${maven-toolchains-plugin.version}</version>
+          <configuration>
+            <toolchains>
+              <jdk><version>8</version></jdk>
+            </toolchains>
+          </configuration>
+          <executions>
+            <execution>
+              <goals><goal>toolchain</goal></goals>
+            </execution>
+          </executions>
+        </plugin>
+
         <plugin>
           <!-- Generates code coverage report from website. -->
           <groupId>org.jacoco</groupId>
@@ -370,15 +359,23 @@
               <goals>
                 <goal>report</goal>
               </goals>
-            </execution> 
+            </execution>
           </executions>
         </plugin>
+
         <plugin>
           <!-- Submit code coverage report to Coveralls.io. -->
           <groupId>org.eluder.coveralls</groupId>
           <artifactId>coveralls-maven-plugin</artifactId>
           <version>${coveralls-maven-plugin.version}</version>
         </plugin>
+
+        <plugin>
+          <groupId>pl.project13.maven</groupId>
+          <artifactId>git-commit-id-plugin</artifactId>
+          <version>${git-commit-id-plugin.version}</version>
+        </plugin>
+
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
@@ -386,12 +383,9 @@
           <configuration>
             <source>${maven.compiler.source}</source>
             <target>${maven.compiler.target}</target>
-            <compilerArgs>
-              <arg>--add-exports</arg>
-              <arg>java.base/sun.nio.ch=ALL-UNNAMED</arg>
-              <arg>--add-exports</arg>
-              <arg>java.base/jdk.internal.ref=ALL-UNNAMED</arg>
-            </compilerArgs>
+<!--        <compilerArgs>
+              <arg>- -add-modules jdk.incubator.foreign</arg>
+            </compilerArgs> -->
           </configuration>
         </plugin>
 
@@ -438,54 +432,13 @@
         <groupId>org.eluder.coveralls</groupId>
         <artifactId>coveralls-maven-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>pl.project13.maven</groupId>
+        <artifactId>git-commit-id-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
   <profiles>
-    <!-- Ignore nuisance warning from Apache parent plugin:
-          "maven-remote-resources-plugin (goal "process") is ignored by m2e".
-          This also should fix the Maven warning that it can't find the lifecycle-mapping jar.
-          This profile is only active when the property "m2e.version" is set,
-          which is the case when building in Eclipse with m2e.
-          The ignore below tells m2eclipse to skip the execution.
-    -->
-    <profile>
-      <id>m2e</id>
-      <activation>
-        <property>
-          <name>m2e.version</name>
-        </property>
-      </activation>
-      <build>
-        <pluginManagement>
-          <plugins>
-            <plugin>
-              <groupId>org.eclipse.m2e</groupId>
-              <artifactId>lifecycle-mapping</artifactId>
-              <version>${lifecycle-mapping.version}</version>
-              <configuration>
-                <lifecycleMappingMetadata>
-                  <pluginExecutions>
-                    <pluginExecution>
-                      <pluginExecutionFilter>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-remote-resources-plugin</artifactId>
-                        <versionRange>${maven-remote-resources-plugin.version}</versionRange>
-                        <goals>
-                          <goal>process</goal>
-                        </goals>
-                      </pluginExecutionFilter>
-                      <action>
-                        <ignore/>
-                      </action>
-                    </pluginExecution>
-                  </pluginExecutions>
-                </lifecycleMappingMetadata>
-              </configuration>
-            </plugin>
-          </plugins>
-        </pluginManagement>
-      </build>
-    </profile>
 
     <profile>
       <id>strict</id>
@@ -509,7 +462,6 @@
                 <compilerId>javac-with-errorprone</compilerId>
                 <forceJavacCompilerUse>true</forceJavacCompilerUse>
               </configuration>
-
             </plugin>
           </plugins>
         </pluginManagement>
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..8a07f65
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,30 @@
+#!/bin/bash -e
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#Java executables for mac environment
+export JAVAC=$JAVA16_HOME/bin/javac
+export JAR=$JAVA16_HOME/bin/jar
+export JAVA=$JAVA16_HOME/bin/java
+
+echo "--- RUN ---"
+
+$JAVA \
+    --module-path target/mods \
+    --module org.apache.datasketches.memory
+#   --class-path "libs/*" \
\ No newline at end of file
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
new file mode 100644
index 0000000..dcee60c
--- /dev/null
+++ b/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Preliminary module
+ * @author lrhodes
+ *
+ */
+module org.apache.datasketches.memory {
+  requires jdk.incubator.foreign;
+  exports org.apache.datasketches.memory;
+}
diff --git a/src/main/java/org/apache/datasketches/memory/AllocateDirect.java b/src/main/java/org/apache/datasketches/memory/AllocateDirect.java
new file mode 100644
index 0000000..ab564d0
--- /dev/null
+++ b/src/main/java/org/apache/datasketches/memory/AllocateDirect.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.datasketches.memory;
+
+//import jdk.incubator.foreign.MemoryAddress;
+import jdk.incubator.foreign.MemorySegment;
+//import static jdk.incubator.foreign.MemorySegment.*;
+
+
+/**
+ *
+ * @author Lee Rhodes
+ */
+class AllocateDirect {
+  private final MemorySegment directSeg;
+
+  /**
+   * Construct Memory Segment
+   * @param capacityBytes blah
+   */
+  AllocateDirect(final long capacityBytes) {
+    directSeg = MemorySegment.allocateNative(capacityBytes);
+  }
+
+  MemorySegment getMemorySegment() {
+    return directSeg;
+  }
+
+  long getNativeAddress() {
+    return directSeg.address().toRawLongValue();
+  }
+
+  void close() {
+    directSeg.close();
+  }
+
+  @SuppressWarnings("resource")
+  public static void checkAllocDirect() {
+    final long bytesIn = 64;
+    AllocateDirect allocateDirect = new AllocateDirect(bytesIn);
+    final MemorySegment seg = allocateDirect.getMemorySegment();
+    final long bytesOut = seg.byteSize();
+    String out = (bytesOut == bytesIn) ? "OK" : "Not OK";
+    System.out.println(out);
+    allocateDirect.close();
+  }
+
+  public static void main(final String[] args) {
+    checkAllocDirect();
+  }
+}
+
diff --git a/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java b/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java
new file mode 100644
index 0000000..1d03488
--- /dev/null
+++ b/src/test/java/org/apache/datasketches/memory/AllocateDirectTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.datasketches.memory;
+
+import jdk.incubator.foreign.MemorySegment;
+import org.testng.annotations.Test;
+//import static org.testng.Assert.assertEquals;
+
+
+/**
+ * Test AllocateDirect.
+ *
+ * @author Lee Rhodes
+ *
+ */
+public class AllocateDirectTest {
+
+  /**
+   * check AllocDirect.
+   */
+  @Test
+  @SuppressWarnings("resource")
+  public void checkAllocDirect() {
+    final long bytesIn = 64;
+    AllocateDirect allocateDirect = new AllocateDirect(bytesIn);
+    final MemorySegment seg = allocateDirect.getMemorySegment();
+    final long bytesOut = seg.byteSize();
+    String out = (bytesOut == bytesIn) ? "OK" : "Not OK";
+    System.out.println(out);
+    allocateDirect.close();
+  }
+
+}
+
diff --git a/tools/CloverConfig.txt b/tools/CloverConfig.txt
new file mode 100644
index 0000000..77ea2ce
--- /dev/null
+++ b/tools/CloverConfig.txt
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+Clover Config for Eclipse:
+
+At Project Level Properties:
+	Instrumentation:
+		Initstring: Default value
+		Output Folder: ...project output dir(s)
+		Flush Policy: At JVM shutdown ...
+		Misc: Fully qualify ... , Instrument and compile at statement level
+	Contexts:
+		Check: assert statements
+		Add Custom Coverage Context Filter:
+			private-constructor: also see link below
+				Method
+				(.* )?private +[a-zA-Z0-9_$]+ *\( *\).*
+	Source Files
+		Only look ...
+			[check] src/main/java[includes=**/*.java][excludes=]
+			[check] src/test/java[includes=**/*.java][excludes=]
+	Test Classes
+		Assume all source in the specified folders are tests or test utility classes
+			[check] src/test/java
+
+At Clover "down-triangle" menu:
+	Columns:
+		Element
+		% TOTAL Coverage
+		Uncovered Elements: Custom: %UncoveredElements * TotalElements / 100
+		Total Elements
+
+
+
+http://alexruizlog.blogspot.com/2009/04/how-to-make-clover-ignore-private_21.html
\ No newline at end of file
diff --git a/tools/FindBugsExcludeFilter.xml b/tools/FindBugsExcludeFilter.xml
new file mode 100644
index 0000000..ae68389
--- /dev/null
+++ b/tools/FindBugsExcludeFilter.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<FindBugsFilter> <!-- memory -->
+
+  <!-- Too many false positives to be useful.  I could not make it happy :( -->
+  <Match>
+    <Bug pattern="SF_SWITCH_NO_DEFAULT" />
+  </Match>
+
+  <Match>   <!-- Exclude for test classes; too many False Positives. -->
+    <Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL" />
+    <Class name="~.*\.*Test" />
+  </Match>
+  
+  <Match>   <!-- Exclude for test classes; too many False Positives. -->
+    <Bug pattern="DLS_DEAD_LOCAL_STORE" />
+    <Class name="~.*\.*Test" />
+  </Match>
+  
+</FindBugsFilter>
+
+
+
+<!--  Examples: -->
+
+<!-- Exclude java.* classes -->
+  <!--
+  <Match>
+    <Package name="java\.*" />
+  </Match>
+-->
+
+  <!-- Exclude test classes -->
+<!-- 
+  <Match>
+    <Class name="~.*\.*Test" />
+  </Match>
+-->
+
+<!--
+     <Match>
+       <Class name="com.foobar.ClassNotToBeAnalyzed" />
+     </Match>
+-->
+<!--
+     <Match>
+       <Class name="com.foobar.ClassWithSomeBugsMatched" />
+       <Bug code="DE,UrF,SIC" />
+     </Match>
+-->
+     <!-- Match all XYZ violations. -->
+<!--
+     <Match>
+       <Bug code="XYZ" />
+     </Match>
+-->
+     <!-- Match all doublecheck violations in these methods of "AnotherClass". -->
+<!--
+     <Match>
+       <Class name="com.foobar.AnotherClass" />
+       <Or>
+         <Method name="nonOverloadedMethod" />
+         <Method name="frob" params="int,java.lang.String" returns="void" />
+         <Method name="blat" params="" returns="boolean" />
+       </Or>
+       <Bug code="DC" />
+     </Match>
+-->
+     <!-- A method with a dead local store false positive (medium priority). -->
+<!--
+     <Match>
+       <Class name="com.foobar.MyClass" />
+       <Method name="someMethod" />
+       <Bug pattern="DLS_DEAD_LOCAL_STORE" />
+       <Priority value="2" />
+     </Match>
+-->
diff --git a/tools/MemoryCheckstyle.xml b/tools/MemoryCheckstyle.xml
new file mode 100644
index 0000000..3b80313
--- /dev/null
+++ b/tools/MemoryCheckstyle.xml
@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+    This configuration file was written by the eclipse-cs plugin configuration editor
+-->
+<!--
+    Checkstyle-Configuration: MemoryCheckstyle
+    Description: none
+-->
+<module name="Checker">
+  <property name="severity" value="warning"/>
+  <property name="charset" value="UTF-8"/>
+  <property name="fileExtensions" value="java"/>
+  <module name="TreeWalker">
+    <module name="AnnotationLocation">
+      <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
+    </module>
+    <module name="AnnotationLocation">
+      <property name="allowSamelineMultipleAnnotations" value="true"/>
+      <property name="tokens" value="VARIABLE_DEF"/>
+    </module>
+    <module name="EmptyBlock">
+      <property name="severity" value="warning"/>
+      <property name="option" value="TEXT"/>
+      <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="EmptyCatchBlock">
+      <property name="severity" value="ignore"/>
+      <property name="exceptionVariableName" value="expected"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="LeftCurly">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="NeedBraces"/>
+    <module name="RightCurly">
+      <property name="severity" value="ignore"/>
+      <property name="option" value="alone"/>
+      <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="FallThrough">
+      <property name="severity" value="warning"/>
+      <property name="reliefPattern" value="fallthru|falls? ?through|FALL[- ]?THROUGH"/>
+    </module>
+    <module name="FinalLocalVariable">
+      <property name="severity" value="warning"/>
+      <property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/>
+    </module>
+    <module name="IllegalTokenText">
+      <property name="severity" value="warning"/>
+      <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
+      <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
+      <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="MissingSwitchDefault">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="MultipleVariableDeclarations">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="NoFinalizer">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="OneStatementPerLine">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="OverloadMethodsDeclarationOrder">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="VariableDeclarationUsageDistance">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="OneTopLevelClass"/>
+    <module name="FinalClass"/>
+    <module name="AvoidStarImport"/>
+    <module name="CustomImportOrder">
+      <property name="customImportOrderRules" value="STATIC###STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE"/>
+      <property name="specialImportsRegExp" value="org"/>
+      <property name="sortImportsInGroupAlphabetically" value="true"/>
+    </module>
+    <module name="RedundantImport"/>
+    <module name="UnusedImports"/>
+    <module name="SuppressionCommentFilter">
+      <property name="offCommentFormat" value="//CHECKSTYLE.OFF\: ([\w\|]+)"/>
+      <property name="onCommentFormat" value="//CHECKSTYLE.ON\: ([\w\|]+)"/>
+      <property name="checkFormat" value="$1"/>
+    </module>
+    <module name="AtclauseOrder">
+      <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
+      <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
+    </module>
+    <module name="JavadocMethod">
+      <property name="allowedAnnotations" value="Override, Test"/>
+      <property name="scope" value="public"/>
+    </module>
+    <module name="JavadocParagraph"/>
+    <module name="JavadocTagContinuationIndentation">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="NonEmptyAtclauseDescription"/>
+    <module name="SingleLineJavadoc">
+      <property name="ignoreInlineTags" value="false"/>
+    </module>
+    <module name="SummaryJavadocCheck">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="ArrayTypeStyle">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="AvoidEscapedUnicodeCharacters">
+      <property name="severity" value="warning"/>
+      <property name="allowEscapesForControlCharacters" value="true"/>
+      <property name="allowByTailComment" value="true"/>
+      <property name="allowNonPrintableEscapes" value="true"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="CommentsIndentation">
+      <property name="severity" value="warning"/>
+    </module>
+    <module name="Indentation">
+      <property name="severity" value="ignore"/>
+      <property name="basicOffset" value="2"/>
+      <property name="caseIndent" value="2"/>
+      <property name="arrayInitIndent" value="2"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="OuterTypeFilename">
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="TodoComment">
+      <property name="severity" value="ignore"/>
+      <property name="format" value="(//TODO)|(//FIXME)"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="UpperEll">
+      <property name="severity" value="warning"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="ModifierOrder">
+      <property name="severity" value="ignore"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="AbbreviationAsWordInName">
+      <property name="severity" value="ignore"/>
+      <property name="allowedAbbreviationLength" value="1"/>
+      <property name="ignoreFinal" value="false"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="ClassTypeParameterName">
+      <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+      <message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''."/>
+    </module>
+    <module name="LocalVariableName">
+      <property name="severity" value="ignore"/>
+      <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+      <property name="allowOneCharVarInForLoop" value="true"/>
+      <message key="name.invalidPattern" value="Local variable name ''{0}'' must match pattern ''{1}''."/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="MemberName">
+      <property name="severity" value="ignore"/>
+      <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+      <message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="MethodName">
+      <property name="severity" value="ignore"/>
+      <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
+      <message key="name.invalidPattern" value="Method name ''{0}'' must match pattern ''{1}''."/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="MethodTypeParameterName">
+      <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+      <message key="name.invalidPattern" value="Method type name ''{0}'' must match pattern ''{1}''."/>
+    </module>
+    <module name="PackageName">
+      <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
+      <message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
+    </module>
+    <module name="ParameterName">
+      <property name="severity" value="ignore"/>
+      <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+      <message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="TypeName">
+      <message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
+    </module>
+    <module name="Regexp">
+      <property name="severity" value="ignore"/>
+      <property name="format" value="[ \t]+$"/>
+      <property name="message" value="Trailing whitespace"/>
+      <property name="illegalPattern" value="true"/>
+      <property name="ignoreComments" value="true"/>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
+    </module>
+    <module name="EmptyLineSeparator">
+      <property name="allowNoEmptyLineBetweenFields" value="true"/>
+    </module>
+    <module name="GenericWhitespace">
+      <message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
+      <message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace."/>
+      <message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
+      <message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace."/>
+    </module>
+    <module name="NoLineWrap"/>
+    <module name="MethodParamPad"/>
+    <module name="OperatorWrap">
+      <property name="option" value="NL"/>
+      <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
+    </module>
+    <module name="SeparatorWrap">
+      <property name="option" value="nl"/>
+      <property name="tokens" value="DOT"/>
+    </module>
+    <module name="SeparatorWrap">
+      <property name="option" value="EOL"/>
+      <property name="tokens" value="COMMA"/>
+    </module>
+    <module name="WhitespaceAround">
+      <property name="allowEmptyConstructors" value="true"/>
+      <property name="allowEmptyMethods" value="true"/>
+      <property name="allowEmptyTypes" value="true"/>
+      <property name="allowEmptyLoops" value="true"/>
+      <message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
+      <message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
+    </module>
+    <module name="JavadocTagContinuationIndentation"/>
+    <module name="AnnotationLocation"/>
+  </module>
+  <module name="BeforeExecutionExclusionFileFilter">
+    <property name="fileNamePattern" value=".*Test\.java$"/>
+  </module>
+  <module name="FileTabCharacter">
+    <property name="eachLine" value="true"/>
+  </module>
+  <module name="JavadocPackage"/>
+  <module name="NewlineAtEndOfFile">
+    <property name="lineSeparator" value="lf"/>
+  </module>
+  <module name="LineLength">
+    <property name="severity" value="warning"/>
+    <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+    <property name="max" value="110"/>
+  </module>
+  <module name="SuppressWithPlainTextCommentFilter">
+    <property name="offCommentFormat" value="//CHECKSTYLE.OFF\: ([\w\|]+)"/>
+    <property name="onCommentFormat" value="//CHECKSTYLE.ON\: ([\w\|]+)"/>
+    <property name="checkFormat" value="$1"/>
+  </module>
+</module>