0

Can I allocate more memory than VmallocTotal given in /proc/meminfo ?

1

vmalloc() is an internal kernel function. It is not available to user programs. It has no effect on allocations of memory for user programs. VmallocTotal limits the allocations of kernel code which calls vmalloc() (and VmallocTotal does not change, either automatically or manually).

Maximum size of memory that can be "allocated" by user programs depends on overcommit settings. I write "allocated" in scare quotes, because "overcommit" somewhat contradicts the idea of "allocating memory". One explanation is here, you can search on the keywords it uses for other explanations: https://serverfault.com/questions/606185/how-does-vm-overcommit-memory-work

As the kernel doc puts it, system calls like mmap() or the old sbrk() do not allocate memory by default. They return "address space". Real memory will be mapped on-demand if/when it is written to. Memory is mapped in terms of pages (usually 4096 bytes).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.