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.
微软的 STL 在他的演讲中简要暗示了 STL 在内核模式下的交互存在问题。有人可以解释一下他的意思吗?
内核模式代码依赖于一些专有的 Microsoft 对 C++ 的扩展,特别是用于确定代码可以在哪个 IRQ 级别运行。如果您弄错了,Windows 可能会出现“Driver IRQL Not Less or Equal”错误蓝屏。
不幸的是,这些扩展与 C++ 模板或虚拟函数不兼容。原因是 C++ 编译器隐式实例化模板和 vtable,但未能应用正确的 IRQL 设置,因为没有明确的实例化点可以从中获取正确的级别。