CAS heap doesn't grow correctly when first page exceeded --------------------------------------------------------
Key: UIMA-440 URL: https://issues.apache.org/jira/browse/UIMA-440 Project: UIMA Issue Type: Bug Components: Core Java Framework Affects Versions: 2.1 Reporter: Adam Lally Priority: Critical Fix For: 2.2 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.