On Wed, Dec 16, 2015 at 11:17 PM, Christian Brabandt <[email protected]> wrote: > On Mi, 16 Dez 2015, Mike Williams wrote: > >> On 16/12/2015 19:14, Christian Brabandt wrote: >> >[HAVE_AVAIL_MEM] >> >>However, it does throw out the setting of maxmem/maxmemtot with it. >> >>The setting of maxmem/maxmemtot should be under a separate control >> >>IMHO. >> > >> >Yes that I thought as well. >> > >> >I remember when I debugged the blowfish corruption bug on Windows I >> >wondered why the maxmem/maxmemtot setting was so much lower than on >> >Linux. I wanted to suggest increasing that setting on Windows as well, >> >but forgot about it. >> >> The simplest fix is to up the default values for maxmem and >> maxmemtot on Win32 to match the values for unix: >> >> >> diff --git a/src/os_win32.h b/src/os_win32.h >> --- a/src/os_win32.h >> +++ b/src/os_win32.h >> @@ -123,11 +123,11 @@ >> #define TEMPNAMELEN _MAX_PATH /* length of temp file name path */ >> >> #ifndef DFLT_MAXMEM >> -# define DFLT_MAXMEM (2*1024) /* use up to 2 Mbyte for a buffer */ >> +# define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ >> #endif >> >> #ifndef DFLT_MAXMEMTOT >> -# define DFLT_MAXMEMTOT (5*1024) /* use up to 5 Mbyte for Vim */ >> +# define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ >> #endif >> >> /* > > Considering that even on my test Linux virtual machine with 2 GB of > memory the limit is about 1GB for maxmem and maxmemtot and considering > the increasing popularity of plugins as well as features like editing > multi GB logfiles and increasing complex undotree available, I still > think that 10 Mbyte and 5 Mbyte for Windows are still a little, err, > "limiting". > > Even before patch 7.3.1142 that limit was a lot higher. > But I guess I can always script something in vimrc file with > wmic os get TotalVisibleMemorySize > > or something like that. > > Best, > Christian > -- > <Joey> Ich habe es damals als Unix-DAU aus der Manpage rausgelesen. > Wenn Du das heute nicht auf die Reihe bekommst, ist das peinlich. > -- #LinuxGER >
In a running Vim (be it Huge gvim GUI, or Huge vim in console, or Tiny "vi" Vim in console) I observe the following: :verbose set maxmem? maxmemtot? maxmempattern? maxmem=4022316 maxmemtot=4022316 maxmempattern=1000 I suppose that the "4G" values (on this 64-bit system with 8G installed and about 65% used), which are about twice the maximum mentioned in the help, correspond to the vague couple of sentences "On 64 bit machines higher values might work. But hey, do you really need more than 2 Gbyte for text editing?" under 'maxmemtot' only (and yes, I'm compiling my own gvim and vi for linux-x86_64). >From Christian's remark above I assume that the values compiled-in will be _increased_ if possible during startup, to reach half the installed memory size (1G on his 2G virtual machine, 4G in a 64-bit Vim on my 8G machine). The values obtained above on my system don't depend on whether or not SeaMonkey (which uses 3.7 GiB all by its ownself, but I have more than 300 open tabs) is running or not at the time of Vim startup. Hmmm, I can't find HAVE_AVAIL_MEM in the config files (in the auto/ subdir of my shadowdir). The only HAVE_A* that I can find is HAVE_ATTRIBUTE_UNUSED. I assume that Linux compile always behaves as if HAVE_AVAIL_MEM were defined. Best regards, Tony. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
