Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-440

CAS heap doesn't grow correctly when first page exceeded

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1
    • 2.2
    • Core Java Framework
    • None

    Description

      This test case (which I''ll check i under this issue) demonstrates the issue:

      for (int j = 0; j < 10; j++) {
      for (int i = 0; i < 200000; i++)

      { cas.createAnnotation(annotType, i, i); }

      heapSize = ((CASImpl) cas).getHeap().getCurrentTempSize();
      bufSize = ((CASImpl)cas).getHeap().heap.length;
      //System.out.println("Heap size: " + heapSize + ", buffer size: " + bufSize);
      assertTrue(heapSize <= bufSize);
      Assert.assertTrue(bufSize < CASImpl.DEFAULT_RESET_HEAP_SIZE);
      cas.reset();
      }

      The CAS should grow by one page initially (to 1,000,000 cells), but then should stay at that size. But this test fails. The output of the System.out.println is:
      Heap size: 800008, buffer size: 1500000
      Heap size: 800008, buffer size: 2000000
      Heap size: 800008, buffer size: 2500000
      Heap size: 800008, buffer size: 3000000
      Heap size: 800008, buffer size: 3500000
      Heap size: 800008, buffer size: 4000000
      Heap size: 800008, buffer size: 4500000

      The heap seems to be growing by one page each time.

      Attachments

        Activity

          People

            twgoetz Thilo Goetz
            alally Adam P. Lally
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: