Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
它是否映射到内存中的零页?
它是Linux的事实是无关紧要的。在 C 中,NULL 常量定义为 '0' - 零。当一个进程试图在受保护模式上下文中取消引用其值为零的指针时,它会导致处理器引发一个中断,然后由操作系统处理(然后通常传递给应用程序的框架,这就是为什么 .NET给你友好的 NullReferenceExceptions 但 C 给你更多神秘的错误)。