What is page table entry size?

1) Because 4 bytes (32 bits) is exactly the right amount of space to hold any address in a 32-bit address space.

2) Because 1 million entries of 4 bytes each makes 4MB.


As for why a PTE(page table entry) is 4 bytes:

Several answers say it's because the address space is 32 bits and the PTE needs 32 bits to hold the address.

But a PTE doesn't contain the complete address of a byte, only the physical page number. The rest of the bits contain flags or are left unused. It need not be 4 bytes exactly.


A page table is a table of conversions from virtual to physical addresses that the OS uses to artificially increase the total amount of main memory available in a system.

Physical memory is the actual bits located at addresses in memory (DRAM), while virtual memory is where the OS "lies" to processes by telling them where it's at, in order to do things like allow for 2^64 bits of address space, despite the fact that 2^34 bits is the most RAM normally used. (2^32 bits is 4 gigabytes, so 2^34 is 16 gb.) Most default page table sizes are 4096 kb for each process, but the number of page table entries can increase if the process needs more process space. Page table sizes can also initially be allocated smaller or larger amounts or memory, it's just that 4 kb is usually the best size for most processes.

Note that a page table is a table of page entries. Both can have different sizes, but page table sizes are most commonly 4096 kb or 4 mb and page table size is increased by adding more entries.