Module swap::pagesize

source ·
Expand description

Helpers to calculate values derived from page size.

This has performance benefits from:

  • Avoiding calling sysconf(_SC_PAGESIZE) multiple times by caching the shift bit.
  • Using the (faster) shift instruction instead of (slower) multiply/divide instruction.

Structs

  • Helper methods to calculate values derived from page size.

Constants

Statics

  • The transparent hugepage size loaded from /sys/kernel/mm/transparent_hugepage/hpage_pmd_size.

Functions