虚拟分配粒度和页面大小

发布于 2024-07-11 08:22:25 字数 250 浏览 6 评论 0原文

Win64 平台上虚拟分配粒度和页面大小的典型值是多少? 那就是 SYSTEM_INFO 的 dwAllocationGranularity 和 dwPageSize。

在 Win32 系统上,这些将为 64k 和 4k。

我需要知道,因为我为 Win32 应用程序设计了一个基于 VirtualAlloc 的自定义分配器,并且想知道我的设计选择在 Win64 上是否仍然有效。 我无法访问Win64系统。

提前致谢!

What are the typical values of the virtual allocation granularity and page size on Win64 platforms? That'd be SYSTEM_INFO's dwAllocationGranularity and dwPageSize.

On Win32 systems these would be 64k and 4k.

I need to know because I've designed a custom allocator based on VirtualAlloc for a Win32 application and wonder if my design choices are still valid on Win64. I have no access to a Win64 system.

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柠檬色的秋千 2024-07-18 08:22:26

在 Vista x64 上还是一样,64k 和 4k。 不确定这一点是否有一天会改变,小页面大小给 TLB 缓存带来了严重的压力,大大降低了分配多 GB 块的程序的性能。 我还看到了一些关于在程序执行期间的某些难以理解的点无法再分配大页面的问题报告。 但目前这只是水晶球。

It is still the same, 64k and 4k on Vista x64. Not so sure if that isn't going to change some day, the small page size is putting serious pressure on the TLB cache, degrading perf considerably for programs that allocate multi-gigabyte chunks. I've also seen several problem reports about not being able to allocate large pages anymore at some inscrutable point during program execution. But that's just crystal-ball staring for now.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文