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

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

Expand Messages
  • jimmywang
    Developers, 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
    Message 1 of 5 , May 14, 2013
    • 0 Attachment
      Developers,

      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.


      Regards
      Jieming

      --
      --
      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.
    • Bram Moolenaar
      ... I get: E342: Out of memory! (allocating 4294901760 bytes) Vim needs a screen buffer, 65535 * 65535 = 4294836225 Makes sense? It actually works for me,
      Message 2 of 5 , May 14, 2013
      • 0 Attachment
        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
        Makes sense?

        It actually works for me, although the screen is messed up, for obvious
        reasons.

        --
        ARTHUR: Bloody peasant!
        DENNIS: Oh, what a give away. Did you hear that, did you hear that, eh?
        That's what I'm on about -- did you see him repressing me, you saw it
        didn't you?
        The Quest for the Holy Grail (Monty Python)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        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.
      • LCD 47
        ... If you re DoS-ing your own terminal, Vim won t save you from the consequences. /lcd -- -- You received this message from the vim_use maillist. Do not
        Message 3 of 5 , May 14, 2013
        • 0 Attachment
          On 14 May 2013, jimmywang <jieming.wang@...> wrote:
          > Developers,
          >
          > 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.

          If you're DoS-ing your own terminal, Vim won't save you from the
          consequences.

          /lcd

          --
          --
          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.
        • jimmywang
          ... 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).
          Message 4 of 5 , May 17, 2013
          • 0 Attachment
            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
            >
            > Makes sense?
            >
            >
            >
            > It actually works for me, although the screen is messed up, for obvious
            >
            > reasons.
            >
            >
            >
            > --
            >
            > ARTHUR: Bloody peasant!
            >
            > DENNIS: Oh, what a give away. Did you hear that, did you hear that, eh?
            >
            > That's what I'm on about -- did you see him repressing me, you saw it
            >
            > didn't you?
            >
            > The Quest for the Holy Grail (Monty Python)
            >
            >
            >
            > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            >
            > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            >
            > \\\ an exciting new programming language -- http://www.Zimbu.org ///
            >
            > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///


            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).

            Cheers
            Jieming

            --
            --
            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.
          • 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 5 of 5 , May 17, 2013
            • 0 Attachment
              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.