IoAllocateIrpEx

_IRP *__stdcall IoAllocateIrpEx(_DEVICE_OBJECT *DeviceObject, CHAR StackSize, UINT8 ChargeQuota){
  PVOID retaddr; 
  if( !IopDispatchAllocateIrp )
    return IopAllocateIrpPrivate(DeviceObject, StackSize, ChargeQuota, retaddr);
  if( IopDispatchAllocateIrp == 2 )
    return IopAllocateIrpWithExtension(DeviceObject, StackSize, ChargeQuota, retaddr);
  return IovAllocateIrp(DeviceObject, StackSize, ChargeQuota, retaddr);
}

Referenced by:

FsRtlGetDirectImageOriginalBase
FsRtlGetFileExtents
FsRtlGetFileSize
FsRtlKernelFsControlFile
FsRtlQueryInformationFile
FsRtlQueryKernelEaFile
FsRtlSetFileSize
FsRtlSetKernelEaFile
VfIrpSendSynchronousIrp