Ioallocatemdl for Kernel APIs

Source: Internet
Author: User
Ioallocatemdl

 IoallocatemdlFunction allocation is sufficient to map a piece of cached MDL to give the starting address and length of the cache.

Pmdl
Ioallocatemdl (
_ In_opt pvoid Virtualaddress,
_ In ulong Length,
_ In Boolean Secondarybuffer,
_ In Boolean Chargequota,
_ Inout_opt pirp IRP Optional
);

The driver can useIoallocatemdlFunction to achieve the purpose of large cache shards, map a small part of the cache through an independent MDL, or map the memory allocated by the driver. The driver will callMmbuildmdlfornonpagedpoolTo set the MDL memory so that the MDL describes that the cache allocated by the driver is not replaceable.

 LengthThe parameter specifies the size of the cache to which MDL points. In Windows Server 2003, Windows XP, and Windows 2000, the maximum number of cache bytes that can be allocated is page_size * (65535-Sizeof(MDL ))/Sizeof(Ulong_ptr ). In Windows Vista and Windows Server 2008, the maximum number of cached bytes is (2 GB-page_size ). in Windows 7 and Windows Server 2008 R2, the maximum number of cached bytes is (4 GB-page_size ).

IfSecondarybufferThe parameter is false. This function is updated.IRP->MdladdressLet it point to a new MDL, that is, let it support large cache fragments. IfSecondarybufferTrue. This function adds MDLIRP->MdladdressAfter the link.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.