开发者

What is at memory location 1 on an Intel x86 machine running Windows XP?

开发者 https://www.devze.com 2022-12-20 02:05 出处:网络
I am running Windows XP on an Intel x86 machine and I got an error in the instruction at memory location 0x00000001.

I am running Windows XP on an Intel x86 machine and I got an error in the instruction at memory location 0x00000001.

I am not worried about debugging the error, but I was interested to know what instructions would generally be located at the very begging of memory.

The only processors I have written low-level code for are PIC microcontroller开发者_如何学编程s, and I know that the first memory location would be a GOTO and then the interrupt vectors.


Windows guarantees that the first 64k and the last 64k of memory will always cause an access violation to read or write. This makes detecting null pointer dereferences easier.

See the graphic in this page below the heading

Free, Reserved, and Committed Virtual Memory

http://msdn.microsoft.com/en-us/library/ms810627.aspx


That is not the actual physical address space 000001. XP is a modern virtual paged memory OS so each application gets its own address space.


I believe that the zero page of a process's address space is deliberately inaccessible on Windows to help detect null pointer errors, in which case there's nothing there.

0

精彩评论

暂无评论...
验证码 换一张
取 消