New method to get alloc type and set alloc type.