Linear / virtual / physical page sizes

Constant page size? To be more specific, getconf PAGE_SIZE gives 4096, fair enough. But can this change through the execution time of the program? Or it is constant throughout the process of processing the OS. That is, is it possible for a process to have sizes of 1024 and 2048 and 4096 pages? For now, just discuss the size of virtual pages. But further, is it possible for a virtual page to cover a larger physical page?

+4
source share
1 answer

Perhaps the process will use more than one page. On newer kernels, this may happen without warning, see Andrea Archangelis transparent huge pages .

In addition, you can request memory with a different (usually large) page size above hugetlbfs .

The main reason for having large pages is performance, TLBs in the processor are very limited in size and smaller, but large pages mean more hits.

+3
source

All Articles