views:

506

answers:

1

Howdy folks,

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!

+2  A: 

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.

Hans Passant
I've heard that page size was 8k on Itanium. Anyway, thanks for your answer!
fbonnet
Yeah, 8K on IA64. Ever seen one?
Hans Passant
Itanium - it is being retired by Intel. Just be glad you never had to work on one. I did when Windows XP was codenamed "Whistler". The box was a pre-production from Intel (and got replaced a few times with a "better" one) with an early version of Visual Studio 7.0. Slow, Noisy as hell, like having a loud vaccuum cleaner next to your desk all day. I ported a Win32 app to Win64 on it, 2,000,000 lines of C++. I was glad when that part of my job was complete and I didn't have to use the Itanium anymore.
Stephen Kellett