Simon Ruggier is correct.   Virtual addressing has nothing to do with
physical address space used.

This "empty" space doesn't even take up swap space, let alone virtual
memory.   It does take up some page tables but that's it.

Having the extra virtual address space there is actually a good thing.
It reduces vulnerability to buffer overflows, and similar issues.

However, I must agree that 1MB is a bit big, especially for libraries
that are only a few kilobytes.  Generally 4KB-64KB of space is enough to
prevent issues.   However, considering the Linux Userland virtual
address space on AMD64 is currently 128TB, I don't think there is any
shortage of virtual address space in the near future.

There may be other reasons for providing this extra space that I don't
know about.   Some of these libraries might allocate additional memory
for certain things, and this would provide plenty of space for them to
do so while keeping the same block of memory.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/24692

Title:
  Amd64 ubuntu build hogs memory due to libs built with excessive
  alignment requirement

To manage notifications about this bug go to:
https://bugs.launchpad.net/nvidia-drivers-ubuntu/+bug/24692/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to