I have a question regarding the CUDA virtual memory management APIs.
I marked a page of memory obtained through VirtualAlloc with PAGE_GUARD, and passed that to cudaHostRegister. I then tried to write to this memory from a kernel, but STATUS_GUARD_PAGE_VIOLATION does not get triggered. It does trigger when the host writes to it.
Is this because the writes are managed by the kernel mode driver, and they can bypass this protection?
Yes, but unless I’m mistaken, aren’t those regions, on windows, allocated using VirtualAlloc.
Basically I’m trying to trigger debugger-like exception within the application. The exception is triggered when a different thread writes to the protected region, but not when a kernel writes to it. I was wondering if I was misunderstanding something.