On 12/04/09 19:26, Dennis Benzinger wrote:
>
> Hi!
>
> I think there's a bug in the options.txt help file. The documentation
> for 'maxmem' and 'maxmemtot' mention that the maximum value for both
> options is 2000000. But :set maxmem? and :set maxmemtot? both return
> 2027686 which is greater that the documented maximum.
>
> Does anybody else see this (small) problem?
>
>
> Dennis Benzinger
You've got a huge lot of memory, haven't you? On my system Vim returns
"only" 1010364 for these options.
There used to be a time when Vim returned silly values when the
available memory was greater than what Vim expected ever to see -- IIRC,
I saw quite small values then. That was fixed (for me) by patch 7.0.236;
however I've kept the "stopgap" code which I'd written into my vimrc
when I noticed the error, as follows:
if &mm < 256
set mm=20000000
endif
if &mmt < 256
set mmt=20000000
endif
These ifs have become no-ops now (at least, as long as Vim behaves, and
doesn't again return very small or negative values); but it looks like
I'm using ten times the present maximum. Maybe the way the option works
has changed... Let's check version7.txt... hm, nothing very explicit,
but it's possible that the option now returns Kb and previously used
bytes. Also, there was an additional fix at 7.1b.002...
Hm, no, after downloading and unpacking the 7.0.0 and 6.4.0 tarballs,
that option was documented just like now.
Well, all I can say is, maybe the actual maximum is 2^21 - 1 (kbytes,
i.e., 2^31-1 bytes) which would mean 2097151? Or maybe it's even higher
than that? Possibly different on 64-bit systems? See also ":help limits"
when it says the max filesize is 2 Gig on 32-bit systems, "much more
than that" on 64-bit.
Maybe it's a little "imprecision" in the helpfile? Anyway, are you
likely to try editing a file or set of files bigger than 2 Gig any time
soon?
BTW, if I try ":set mmt=20000000" gvim doesn't complain, and ":set mmt?"
after that displays those ludicrous twenty million.
Best regards,
Tony.
--
One learns to itch where one can scratch.
-- Ernest Bramah
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---