Implement aligned WDK allocator
Now the WDK allocator can allocate aligned memory according to the layout argument.
Note that this allocator won't waste additional space for alignment if the alignment is normal (e.g.: less than or equal to 16-byte boundary on 64-bit platform). In average scenario, this is better than _aligned_malloc and _aligned_free in msvcrt, in that I guess we rarely need big alignments in drivers for some stuff in the pool. Still, some performance-critical codes might require cache-aligned (e.g.: 64-byte in x86) objects, which is usually bigger than ExAllocatePool2's alignment.
Close #303.
related to #303? @gurry could you also take a look at this and provide feedback :)
Thanks for the feedback! I did wrote an example, but in a local separate crate, because rust-analyzer marks most parts of wdk-alloc crate as inactive codes for some strange reasons. It won't be marked as inactive if I check it in a separate crate. I will copy'n'paste my validation example here soon.
related to #303? @gurry could you also take a look at this and provide feedback :)
Thanks @wmmc88. I will have a look.
Just FYI that I edited the first comment of this PR thread so that this PR will close #303 on merge.
Just FYI that I edited the first comment of this PR thread so that this PR will close #303 on merge.
Thanks. Yes, #303 should be closed.
I am done with my review. Will wait for inputs from @wmmc88.