public void allocateSegments ( int numberOfSegments ) { while ( getBlockCount ( ) < numberOfSegments ) { MemorySegment next = this . availableMemory . nextSegment ( ) ; if ( next != null ) { this . partitionPages . add ( next ) ; } else { return ; } } }
attempts to allocate specified number of segments and should only be used by compaction partition fails silently if not enough segments are available since next compaction could still succeed