[4] Computer memory is divided into pages so that information can be found more quickly.
Since every access to memory must be mapped from virtual to physical address, reading the page table every time can be quite costly.
Smaller page sizes ensure a closer match to the actual amount of memory required in an allocation.
This allows programs to use memory more efficiently by aligning allocations to this size and reducing overall internal fragmentation of pages.
The available page sizes depend on the instruction set architecture, processor type, and operating (addressing) mode.
This support for larger pages (known as "huge pages" in Linux, "superpages" in FreeBSD, and "large pages" in Microsoft Windows and IBM AIX terminology) allows for "the best of both worlds", reducing the pressure on the TLB cache (sometimes increasing speed by as much as 15%) for large allocations while still keeping memory usage at a reasonable level for small allocations.
IA-64 supports as many as eight different page sizes, from 4 KiB up to 256 MiB, and some other architectures have similar features.
[specify] Larger pages, despite being available in the processors used in most contemporary personal computers, are not in common use except in large-scale applications, the applications typically found in large servers and in computational clusters, and in the operating system itself.
Commonly, their use requires elevated privileges, cooperation from the application making the large allocation (usually setting a flag to ask the operating system for huge pages), or manual administrator configuration; operating systems commonly, sometimes by design, cannot page them out to disk.
Each individual process can provide hints and the operating system will automatically use the largest page size possible for a given region of address space.
[28] Later work proposed transparent operating system support for using a mix of page sizes for unmodified applications through preemptible reservations, opportunistic promotions, speculative demotions, and fragmentation control.
[36] Note that until recently in Linux, applications needed to be modified in order to use huge pages.