Loading ...
Sorry, an error occurred while loading the content.
 

Re: vim consumes huge memory with stty rows/columns set to 64K

Expand Messages
  • Tim Chase
    ... I m not sure why you think that *vim* needs to be fixed. It s doing what you asked it to. Vim valiantly tries and, I suppose if you actually have gobs of
    Message 1 of 5 , May 17, 2013
      On 2013-05-17 09:47, jimmywang wrote:
      > On Tuesday, May 14, 2013 1:58:13 PM UTC-4, Bram Moolenaar wrote:
      >> Jieming wrote:
      >>> On Linux (64 bit), the following tty settings will can cause
      >>> vi to consume 40G, and can cause system to run out of memory:
      >>
      >>> stty rows 65535
      >>> stty columns 65535
      >>> vi foo
      >>
      >>> This need to be fixed (e.g., restrict columns to 512). Any
      >>> comments.
      >>
      >> I get:
      >>
      >> E342: Out of memory! (allocating 4294901760 bytes)
      >>
      >> Vim needs a screen buffer, 65535 * 65535 = 4294836225
      >
      > Some application sets this. It took a while to figure out how vim
      > eats so much memory. But regardless, need to fix vim (e.g., set max
      > columns to 512).

      I'm not sure why you think that *vim* needs to be fixed. It's doing
      what you asked it to. Vim valiantly tries and, I suppose if you
      actually have gobs of memory, will actually succeed in doing what you
      request. The application making the ridiculous request in the first
      place is the one that needs to be fixed. It's clearly an issue if a
      program requests 40GB of virtual terminal space.

      -tim



      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.