IT 之家 10 月 20 日消息,科技媒体 Windows Latest 昨日(10 月 19 日)发布博文,报道称在 Windows 11 最新的 26H2 版本中,微软依然保留名为 EmulateHeap 的兼容性修复组件,该组件可以追溯到 Windows 95 时代。

起源方面,早期 Windows 3.x 版《模拟城市》(SimCity)游戏存在 " 释放后使用 "(use-after-free)漏洞,程序在释放内存后仍继续读取该内存。由于旧系统不会立即回收内存,游戏运行正常,但到了 Windows 95 测试版,由于微软改变内存管理方式后,会导致游戏出现运行故障。

在《模拟城市》特例之后,微软发现其它应用和游戏也有类似需求,因此微软针对 Windows XP 系统,复制 Windows 95 内存堆管理器源码,在重新编译加入兼容性框架后形成 EmulateHeap。
在 Windows XP 系统中,旧程序调用 HeapCreate、LocalLock、GlobalReAlloc 等内存 API 时,该组件重定向到模拟 Windows 95 的实现中。
在当前 Windows 11 系统中,只有当某个应用被明确启用 EmulateHeap 时,相关旧代码才会从硬盘加载。用户可通过 Windows ADK 中的 " 兼容性管理器 " 查看该修复项。

