diff options
author | Pavel Platto <hinidu@gmail.com> | 2014-06-06 16:50:20 +0300 |
---|---|---|
committer | Pavel Platto <hinidu@gmail.com> | 2014-08-02 09:17:00 +0300 |
commit | ff71a042a252ecebf7e0391e0de0783e43b9285a (patch) | |
tree | 6dce0909b24f4e065db0da38dbacfcaaa9904c89 | |
parent | 5881842007c8ca95e74311844d05b0ae9372be1d (diff) | |
download | rneovim-ff71a042a252ecebf7e0391e0de0783e43b9285a.tar.gz rneovim-ff71a042a252ecebf7e0391e0de0783e43b9285a.tar.bz2 rneovim-ff71a042a252ecebf7e0391e0de0783e43b9285a.zip |
Remove HAVE_TOTAL_MEM
libuv provide uv_get_total_mem_kib. So HAVE_TOTAL_MEM should always be
true.
Before that commit in neovim maxmem=5120 and maxmemtot=10240. Now
both equal to half of system memory.
-rw-r--r-- | src/nvim/option.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index fa51f85300..fd834788db 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1933,26 +1933,15 @@ void set_init_1(void) */ opt_idx = findoption((char_u *)"maxmemtot"); if (opt_idx >= 0) { -#ifndef HAVE_TOTAL_MEM - if (options[opt_idx].def_val[VI_DEFAULT] == (char_u *)0L) -#endif { -#ifdef HAVE_TOTAL_MEM /* Use half of amount of memory available to Vim. */ /* If too much to fit in long_u, get long_u max */ uint64_t available_kib = os_get_total_mem_kib(); n = available_kib / 2 > ULONG_MAX ? ULONG_MAX : (long_u)(available_kib /2); -#else - n = (0x7fffffff >> 11); -#endif options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n; opt_idx = findoption((char_u *)"maxmem"); if (opt_idx >= 0) { -#ifndef HAVE_TOTAL_MEM - if ((long)options[opt_idx].def_val[VI_DEFAULT] > (long)n - || (long)options[opt_idx].def_val[VI_DEFAULT] == 0L) -#endif options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n; } } |