4

I know the default page size of a 32-bit process running on 32-bit Windows is 4K, whereas that of a 64-bit process running on 64-bit Windows is 8K. However, what is the actual page size of a 32-bit process running on 64-bit Windows (i.e. WOW64) ? 4K? 8K?

0

3 Answers 3

8

Ideally, you should call GetSystemInfo() and examine SYSTEM_INFO.dwPageSize.

Btw, I doubt that you have 8KB pages in 64-bit Windows. x86/64 CPUs support pages of the following sizes: 4KB (all modes), 4MB (32-bit non-PAE), 2MB (32/64-bit PAE), 1GB (64-bit, always PAE). You can find this in the CPU manual from Intel (or AMD).

Sign up to request clarification or add additional context in comments.

Comments

5

The page size is still 4K - 1M pages at 4GB maximum addressable RAM memory

Virtual memory size. On the Intel Itanium processor, WOW64 adds significant overhead if two or more instances of the same 32-bit application are running concurrently. This is due to the native 8 KB pages on the Intel Itanium, which complicates the emulation of the native 4 KB pages on the x86 architecture (more pages are marked as writable; all writable pages are private to the process). This can adversely affect the scalability of Terminal Services on certain processors. This is not the case for the x64 processor.

Read more about WOW64 here (cached)

4 Comments

This is about Itanium, which is existing architecture, but not x64, which is what people usually mean when talking about 64b Windows.
@Suma x64 bit architecture came from Itanium. Same way that most of x86 architecture of say, pentium came from 80386
No, it did not. x64 was redeveloped from x86. It has nothing in common with Itanium. Itanium was first, developed by Intel, and was a radical change from x86. Itanium was not used outside of the server marked. x64 was then developed by AMD as a competing solution, and was so successful it was used by Intel as well . See e.g. Itanium Wikipedia "AMD chose a different direction, designing the less radical x86-64, a 64-bit extension to the existing x86 architecture"
Rereading the quote now, I have to correct my comment a bit now. While the quote is mostly about Itanium and its emulation, it contains the information about x64 as well, explicitely stating "This is not the case for the x64 processor". This means the quote provided shows x86 application gets 4 KB pages on both Itanium and x64.
3

The correct answer to this question is "It depends on which processor".

Itanium uses 8KB pages.

X86-32 and x86-64 uses 4KB, 2MB and 1GB pages as appropriate [note that for 2MB and 1GB pages to work, the memory needs to be a multiple of 2MB/1GB in size and be aligned to 2MB/1GB respectively].

Other processors, such as ARM (currently only 32-bit OS), typically uses 4KB pages, but can also use 64KB pages.

If you can find an old DEC Alpha processor, and operating system to match, that would also use 8KB pages.

2 Comments

This is correct, however as the quote in Aniket's answer shows, even on Itanium the 4KB page is emulated for x86 apps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.