protected MemoryBlock allocatePage ( long required ) { MemoryBlock page = taskMemoryManager . allocatePage ( Math . max ( pageSize , required ) , this ) ; if ( page == null || page . size ( ) < required ) { throwOom ( page , required ) ; } used += page . size ( ) ; return page ; }
Allocate a memory block with at least required bytes .