// ks.h
KSDDKAPI NTSTATUS KsCreateDefaultAllocator(
[in] PIRP Irp
);
View the official Windows Driver Kit DDI referenceNo description available.
Given a validated IRP_MJ_CREATE request, the KsCreateDefaultAllocator function creates a default allocator that uses the specified memory pool and associates the IoGetCurrentIrpStackLocation(Irp)->FileObject with the allocator using an internal dispatch table (KSDISPATCH_TABLE).
Irp [in]Specifies the IRP with the IRP_MJ_CREATE request being handled.
The KsCreateDefaultAllocator function returns STATUS_SUCCESS if successful, or it returns an error if unsuccessful.