test_class.file: hprof-heap/src/test/java/org/gridkit/jvmtool/heapdump/io/PagedVirtualMemoryTest.java
test_class.identifier: PagedVirtualMemoryTest
test_case.body: @Test
      public void randomAccessRun() {
          
          TestMemory mem = new TestMemory();
          int limit = 16 << 10;
          mem.setLimit(limit);
          Random rnd = new Random();
          
          for(int i = 0; i != 10000; ++i) {
              long n = rnd.nextInt(limit - 64);
              
              verify(mem, n, 64);
          }
          
          System.out.println(mem.getFaultCount());
      }
test_case.class_method_signature: PagedVirtualMemoryTest.randomAccessRun()
test_case.full_signature: @Test public void randomAccessRun()
test_case.identifier: randomAccessRun
test_case.invocations: setLimit nextInt verify println getFaultCount
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void randomAccessRun()
focal_class.declarator: SANITY_LIMIT = 1l << 40
focal_class.modifier: private static final
focal_class.original_string: private static final long SANITY_LIMIT = 1l << 40;
focal_class.type: long
focal_class.var_name: SANITY_LIMIT
focal_class.declarator: LOAD_BUST = 16
focal_class.modifier: private static final
focal_class.original_string: private static final int LOAD_BUST = 16;
focal_class.type: int
focal_class.var_name: LOAD_BUST
focal_class.declarator: MAP_BUST = 4
focal_class.modifier: private static final
focal_class.original_string: private static final int MAP_BUST = 4;
focal_class.type: int
focal_class.var_name: MAP_BUST
focal_class.declarator: cmp = new PageComparator()
focal_class.modifier: private final
focal_class.original_string: private final PageComparator cmp = new PageComparator();
focal_class.type: PageComparator
focal_class.var_name: cmp
focal_class.declarator: pagePool
focal_class.modifier: protected final
focal_class.original_string: protected final PagePool pagePool;
focal_class.type: PagePool
focal_class.var_name: pagePool
focal_class.declarator: pageSize
focal_class.modifier: protected final
focal_class.original_string: protected final int pageSize;
focal_class.type: int
focal_class.var_name: pageSize
focal_class.declarator: pageBits
focal_class.modifier: protected final
focal_class.original_string: protected final int pageBits;
focal_class.type: int
focal_class.var_name: pageBits
focal_class.declarator: pageMask
focal_class.modifier: protected final
focal_class.original_string: protected final long pageMask;
focal_class.type: long
focal_class.var_name: pageMask
focal_class.declarator: bufferMap = new ByteBuffer[0]
focal_class.modifier: private
focal_class.original_string: private ByteBuffer[] bufferMap = new ByteBuffer[0];
focal_class.type: ByteBuffer[]
focal_class.var_name: bufferMap
focal_class.declarator: hitCounts = new int[0]
focal_class.modifier: private
focal_class.original_string: private int[] hitCounts = new int[0];
focal_class.type: int[]
focal_class.var_name: hitCounts
focal_class.declarator: pageMap = new PageInfo[0]
focal_class.modifier: private
focal_class.original_string: private PageInfo[] pageMap = new PageInfo[0];
focal_class.type: PageInfo[]
focal_class.var_name: pageMap
focal_class.declarator: pageFaults = 0
focal_class.modifier: private
focal_class.original_string: private long pageFaults = 0;
focal_class.type: long
focal_class.var_name: pageFaults
focal_class.declarator: eof = SANITY_LIMIT
focal_class.modifier: private
focal_class.original_string: private long eof = SANITY_LIMIT;
focal_class.type: long
focal_class.var_name: eof
focal_class.declarator: pages = new ArrayList<PageInfo>()
focal_class.modifier: private
focal_class.original_string: private List<PageInfo> pages = new ArrayList<PageInfo>();
focal_class.type: List<PageInfo>
focal_class.var_name: pages
focal_class.declarator: mappedPageCount = 0
focal_class.modifier: private
focal_class.original_string: private int mappedPageCount = 0;
focal_class.type: int
focal_class.var_name: mappedPageCount
focal_class.declarator: mappedPageLimit = 0
focal_class.modifier: private
focal_class.original_string: private int mappedPageLimit = 0;
focal_class.type: int
focal_class.var_name: mappedPageLimit
focal_class.file: hprof-heap/src/main/java/org/gridkit/jvmtool/heapdump/io/PagedVirtualMemory.java
focal_class.identifier: PagedVirtualMemory
focal_class.class_method_signature: PagedVirtualMemory.PagedVirtualMemory(PagePool pagePool)
focal_class.full_signature: public  PagedVirtualMemory(PagePool pagePool)
focal_class.identifier: PagedVirtualMemory
focal_class.modifiers: public
focal_class.parameters: (PagePool pagePool)
focal_class.signature:  PagedVirtualMemory(PagePool pagePool)
focal_class.class_method_signature: PagedVirtualMemory.setLimit(long vsize)
focal_class.full_signature: public void setLimit(long vsize)
focal_class.identifier: setLimit
focal_class.modifiers: public
focal_class.parameters: (long vsize)
focal_class.return: void
focal_class.signature: void setLimit(long vsize)
focal_class.class_method_signature: PagedVirtualMemory.readChar(long index)
focal_class.full_signature: public char readChar(long index)
focal_class.identifier: readChar
focal_class.modifiers: public
focal_class.parameters: (long index)
focal_class.return: char
focal_class.signature: char readChar(long index)
focal_class.class_method_signature: PagedVirtualMemory.readDouble(long index)
focal_class.full_signature: public double readDouble(long index)
focal_class.identifier: readDouble
focal_class.modifiers: public
focal_class.parameters: (long index)
focal_class.return: double
focal_class.signature: double readDouble(long index)
focal_class.class_method_signature: PagedVirtualMemory.readFloat(long index)
focal_class.full_signature: public float readFloat(long index)
focal_class.identifier: readFloat
focal_class.modifiers: public
focal_class.parameters: (long index)
focal_class.return: float
focal_class.signature: float readFloat(long index)
focal_class.class_method_signature: PagedVirtualMemory.readInt(long index)
focal_class.full_signature: public int readInt(long index)
focal_class.identifier: readInt
focal_class.modifiers: public
focal_class.parameters: (long index)
focal_class.return: int
focal_class.signature: int readInt(long index)
focal_class.class_method_signature: PagedVirtualMemory.readLong(long index)
focal_class.full_signature: public long readLong(long index)
focal_class.identifier: readLong
focal_class.modifiers: public
focal_class.parameters: (long index)
focal_class.return: long
focal_class.signature: long readLong(long index)
focal_class.class_method_signature: PagedVirtualMemory.readShort(long index)
focal_class.full_signature: public short readShort(long index)
focal_class.identifier: readShort
focal_class.modifiers: public
focal_class.parameters: (long index)
focal_class.return: short
focal_class.signature: short readShort(long index)
focal_class.class_method_signature: PagedVirtualMemory.readByte(long index)
focal_class.full_signature: public byte readByte(long index)
focal_class.identifier: readByte
focal_class.modifiers: public
focal_class.parameters: (long index)
focal_class.return: byte
focal_class.signature: byte readByte(long index)
focal_class.class_method_signature: PagedVirtualMemory.readBytes(long position, byte[] chars)
focal_class.full_signature: public void readBytes(long position, byte[] chars)
focal_class.identifier: readBytes
focal_class.modifiers: public
focal_class.parameters: (long position, byte[] chars)
focal_class.return: void
focal_class.signature: void readBytes(long position, byte[] chars)
focal_class.class_method_signature: PagedVirtualMemory.readSafe(long index, byte[] buffer, int len)
focal_class.full_signature: private void readSafe(long index, byte[] buffer, int len)
focal_class.identifier: readSafe
focal_class.modifiers: private
focal_class.parameters: (long index, byte[] buffer, int len)
focal_class.return: void
focal_class.signature: void readSafe(long index, byte[] buffer, int len)
focal_class.class_method_signature: PagedVirtualMemory.ensureBuffer(long index)
focal_class.full_signature: private ByteBuffer ensureBuffer(long index)
focal_class.identifier: ensureBuffer
focal_class.modifiers: private
focal_class.parameters: (long index)
focal_class.return: ByteBuffer
focal_class.signature: ByteBuffer ensureBuffer(long index)
focal_class.class_method_signature: PagedVirtualMemory.allocPage()
focal_class.full_signature: protected PageInfo allocPage()
focal_class.identifier: allocPage
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: PageInfo
focal_class.signature: PageInfo allocPage()
focal_class.class_method_signature: PagedVirtualMemory.allocBuffer()
focal_class.full_signature: protected ByteBuffer allocBuffer()
focal_class.identifier: allocBuffer
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: ByteBuffer
focal_class.signature: ByteBuffer allocBuffer()
focal_class.class_method_signature: PagedVirtualMemory.reclaimPages(PageInfo[] pages)
focal_class.full_signature: protected void reclaimPages(PageInfo[] pages)
focal_class.identifier: reclaimPages
focal_class.modifiers: protected
focal_class.parameters: (PageInfo[] pages)
focal_class.return: void
focal_class.signature: void reclaimPages(PageInfo[] pages)
focal_class.class_method_signature: PagedVirtualMemory.loadPage(int pageId)
focal_class.full_signature: protected abstract void loadPage(int pageId)
focal_class.identifier: loadPage
focal_class.modifiers: protected abstract
focal_class.parameters: (int pageId)
focal_class.return: void
focal_class.signature: void loadPage(int pageId)
focal_class.class_method_signature: PagedVirtualMemory.isPageMapped(int pageId)
focal_class.full_signature: protected boolean isPageMapped(int pageId)
focal_class.identifier: isPageMapped
focal_class.modifiers: protected
focal_class.parameters: (int pageId)
focal_class.return: boolean
focal_class.signature: boolean isPageMapped(int pageId)
focal_class.class_method_signature: PagedVirtualMemory.mapPage(int pageId, PageInfo info)
focal_class.full_signature: protected void mapPage(int pageId, PageInfo info)
focal_class.identifier: mapPage
focal_class.modifiers: protected
focal_class.parameters: (int pageId, PageInfo info)
focal_class.return: void
focal_class.signature: void mapPage(int pageId, PageInfo info)
focal_class.class_method_signature: PagedVirtualMemory.pageFault(int pageId)
focal_class.full_signature: protected void pageFault(int pageId)
focal_class.identifier: pageFault
focal_class.modifiers: protected
focal_class.parameters: (int pageId)
focal_class.return: void
focal_class.signature: void pageFault(int pageId)
focal_class.class_method_signature: PagedVirtualMemory.fadeHitCounts()
focal_class.full_signature: private void fadeHitCounts()
focal_class.identifier: fadeHitCounts
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void fadeHitCounts()
focal_method.body: public void setLimit(long vsize) {
          eof = vsize;
          int n = (int) (vsize >> pageBits);
          if (n >= bufferMap.length) {
              int nsize = Math.max(n + 1, (3 * bufferMap.length) / 4);
              bufferMap = Arrays.copyOf(bufferMap, nsize);
              hitCounts = Arrays.copyOf(hitCounts, nsize);
              pageMap = Arrays.copyOf(pageMap, nsize);
          }
      }
focal_method.class_method_signature: PagedVirtualMemory.setLimit(long vsize)
focal_method.full_signature: public void setLimit(long vsize)
focal_method.identifier: setLimit
focal_method.invocations: max copyOf copyOf copyOf
focal_method.modifiers: public
focal_method.parameters: (long vsize)
focal_method.return: void
focal_method.signature: void setLimit(long vsize)