@ Override public AllocationPoint allocateMemory ( DataBuffer buffer , AllocationShape requiredMemory , boolean initialize ) { // by default we allocate on initial location AllocationPoint point = null ; if ( configuration . getMemoryModel ( ) == Configuration . MemoryModel . IMMEDIATE ) { point = allocateMemory ( buffer , requiredMemory , memoryHandler . getInitialLocation ( ) , initialize ) ; } else if ( configuration . getMemoryModel ( ) == Configuration . MemoryModel . DELAYED ) { // for DELAYED memory model we allocate only host memory, regardless of firstMemory configuration value point = allocateMemory ( buffer , requiredMemory , AllocationStatus . HOST , initialize ) ; } return point ; }
This method allocates required chunk of memory