1

/proc/meminfo has a memory statistic VmallocTotal. It is described as

Total size of vmalloc memory area.

in proc's man page

and elsewhere as

Total memory available in kernel for vmalloc allocations

It sparked my curiosity because it is a very high number and everywhere I searched it is exactly 34359738367 kB. It seems like an arbitrary maximum. But what is the significance of 34359738367 kB? It is not a multiple of 2, not a prime number, but it is 0x7FFFFFFFF in hexadecimal. I also noticed pmap process memory map addresses max out at 0x7FFFFFFFF. But then what is the practical significance of 0x7FFFFFFFF?

1 Answers1

3

That’s 32 TiB, the amount of space set aside for vmalloc in the Linux kernel’s x86-64 memory map.

It’s large because the 64-bit address space is large. I don’t think there’s any significance to its specific size other than it was a neat subdivision when the layout was designed.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164