On 19/10/09 12:10, winterTTr wrote:
>
> I don't know much about the memory management for the vim.
> But , recently , my gvim ( gvim72 under WinXP ) always give a warning
> about "Out of memory!  (allocating %d bytes)" where %d is a number .
> The warning appeared sometimes, but not every time.

Which patchlevel? See http://ftp.vim.org/pub/vim/patches/7.2/README for 
a one-line summary of each of the more than 300 official patches since 
Vim 7.2 was released. The ":version" command tells you (near the top) 
which patches are included, or if it doesn't then you don't have any.

>
> I try to autoload some python module ( written by myself ) via "pyfile
> filename.py"
> in my vimrc , and everything goes well except the warning sometimes.
>
> I think maybe the python script is a bit complex ( about 10 files ,
> 50K totally )
> but there is indeed a enough memory for vim .
>
> Is there a memory limit for the vim?

yes, see ":help limits". The default memory size for the whole of Vim is 
either half of your RAM, or an OS-dependent value between 2 and 10 
magabytes, whichever is largest; but you can increase or decrease the 
value, see
        :help 'maxmemtot'       " for the whole of Vim
        :help 'maxmem'          " for each separate edit buffer
        :help 'maxmempattern'   " workarea for pattern matching

With modern computers (whose RAM is counted in gigabytes) the former two 
default to half your RAM, the latter to one megabyte.

> Or , does someone see this problem before because the load of some python 
> code ?

Could be -- I don't know how python (and the Vim-python interface, and 
your python module) manage memory. Do you really have to run that 
complex a python module inside of Vim? Couldn't you either run it 
externally (with the :! command or the system() function), or else 
convert as much of it as possible to vimscript, and only interface to 
Python for computations that Vim cannot do all by itself?


Best regards,
Tony.
-- 
Sorry, no fortune this time.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui