The prefix of the function name during runtime is RTL. I. Non-overlapping memory replication Rtlcopymemory Ii. Overlapping memory Replication Rtlmovememory 3. Memory Filling Rtlfillmemory Iv. zero memory fill Rtlzerobytes Rtlzeromemory It seems that the memory filling operation can also be implemented by using the memory-filled rtlfillmemory. 5. Memory comparison Rtlcomparememory 6. Check whether the memory is readable. Probeforread 7. Check whether the memory is writable. Probeforwrite The sixth and seventh functions do not return true or false, but cause an exception. VII. Sample Code # Define buffer_size 1024 # Pragma initcode Void rtltest () { Puchar pbuffer = (puchar) exallocatepool (pagedpool, buffer_size ); // Fill the memory with zero Rtlzeromemory (pbuffer, buffer_size ); Puchar pbuffer2 = (puchar) exallocatepool (pagedpool, buffer_size ); // Fill the memory with fixed bytes Rtlfillmemory (pbuffer2, buffer_size, 0xaa ); // Memory Replication Rtlcopymemory (pbuffer, pbuffer2, buffer_size ); // Determine whether the memory is consistent Ulong ulret = rtlcomparememory (pbuffer, pbuffer2, buffer_size ); If (ulret = buffer_size) { Kdprint ("the two memory blocks are consistent! ")); |