Filip Navara wrote:
This looks really really wrong ... the macro will incorrectly evaluate to TRUE for user mode pointers on 3GB kernels. I don't understand the purpose of the code, but why don't you just check for Ptr >= MM_SYSTEM_RANGE_START ?
This is true. But this macro isn't supposed to be used to check whether a pointer is a pointer to kernel or user memory range. It should rather be used to check whether a given value is a pointer or an offset. Maybe "IsPointer(An)Offset" would've been a better name for it. The macro really isn't supposed to be used to evaluate pointer ranges.
Best Regards, Thomas