Virtual allocation granularity and page size

流过昼夜 提交于 2019-12-10 13:38:47

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/438863/virtual-allocation-granularity-and-page-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!