aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/buf_functions_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-05-02 10:09:51 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-05-02 10:14:42 +0200
commite46534b4230242c0d41831cc7ad16863c976b151 (patch)
tree218e0d6c4b9cfc0765052755b4518bf16eafe8aa /test/functional/eval/buf_functions_spec.lua
parentc9e340b7be021b25485dff58059bfb5bdaed8e51 (diff)
parentd0b08f32f56c39df484ca10c6c928596548ad8f6 (diff)
downloadrneovim-e46534b4230242c0d41831cc7ad16863c976b151.tar.gz
rneovim-e46534b4230242c0d41831cc7ad16863c976b151.tar.bz2
rneovim-e46534b4230242c0d41831cc7ad16863c976b151.zip
Merge #4486 'refactor: Remove maxmem, maxmemtot options'
After this change we never release blocks from memory (in practice it never happened because the memory limits are never reached). Let the OS take care of that. --- On today's systems the 'maxmem' and 'maxmemtot' values are huge (4+ GB) so the limits are never reached in practice, but Vim wastes a lot of time checking if the limit was reached. If the limit is reached Vim starts saving pieces of the swap file that were in memory to the disk. Said in a different way: Vim implements its own memory-paging mechanism. This is unnecessary and inefficient since the operating system already has virtual memory and will swap to the disk if programs start using too much memory. This change does... 1. Reduce the number of config options and need for documentation. 2. Make the code more efficient as we don't have to keep track of memory usage nor check if the memory limits were reached to start swapping to disk every time we need memory for buffers. 3. Simplify the code. Once memfile.c is simple enough it could be replaced by actual operating system memory mapping (mmap, MemoryViewOfFile...). This change does not prevent Vim to recover changes from swap files since the swapping code is never triggered with the huge limits set by default.
Diffstat (limited to 'test/functional/eval/buf_functions_spec.lua')
0 files changed, 0 insertions, 0 deletions