Is there some quick way to find out the last valid address I may access without causing and exception or fault? I'm asking to find some way for the general purpose routines that pick up 4 or 8 bytes at a time to know when to stop.
As long as you remain within a single page, the permissions do not change. Therefore you are alirght if you don't cross page boundaries.
And if I find I that the next access of 4 or 8 bytes would cross a page boundary, how can I tell if my space actually ends at the end of the page or not?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualquery.asp
Thanks.