Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Virtual allocation granularity and page size

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!

like image 219
fbonnet Avatar asked Jan 13 '09 13:01

fbonnet


1 Answers

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.

like image 66
Hans Passant Avatar answered Oct 02 '22 16:10

Hans Passant