From 63aa0de654fb704b375f74d7b1cb3da56d122658 Mon Sep 17 00:00:00 2001 From: Jason Koch Date: Fri, 30 Apr 2021 14:51:47 -0700 Subject: [PATCH] (interim) dominatortree to use memory mapped region Change-Id: Idefec4240f695aca191dfc62c1029b0e40c2d8d1 --- .../mat/parser/index/HeapIntArray.java | 25 +++++++++++++++++++ .../mat/parser/index/HeapLongArray.java | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapIntArray.java create mode 100644 plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapLongArray.java diff --git a/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapIntArray.java b/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapIntArray.java new file mode 100644 index 00000000..2d35b987 --- /dev/null +++ b/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapIntArray.java @@ -0,0 +1,25 @@ +package org.eclipse.mat.parser.index; + +public class HeapIntArray implements IntArray +{ + final int[] array; + public HeapIntArray(int size) + { + this.array = new int[size]; + } + + public int get(int index) + { + return array[index]; + } + + public void set(int index, int value) + { + array[index] = value; + } + + public int size() + { + return array.length; + } +} \ No newline at end of file diff --git a/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapLongArray.java b/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapLongArray.java new file mode 100644 index 00000000..2227f2c7 --- /dev/null +++ b/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/index/HeapLongArray.java @@ -0,0 +1,25 @@ +package org.eclipse.mat.parser.index; + +public class HeapLongArray implements LongArray +{ + final long[] array; + public HeapLongArray(int size) + { + this.array = new long[size]; + } + + public long get(int index) + { + return array[index]; + } + + public void set(int index, long value) + { + array[index] = value; + } + + public int size() + { + return array.length; + } +} \ No newline at end of file -- 2.27.0