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

Memory Problem: writing files

Expand Messages
  • nikogh
    I need some help with a memory problem creating a lot of files with vim script. Is anybody able to explain, why the following code increases the used memory?
    Message 1 of 4 , Feb 29, 2008
    • 0 Attachment
      I need some help with a memory problem creating a lot of files with
      vim script.
      Is anybody able to explain, why the following code increases the used
      memory?

      ATTENTION, INFINITE LOOP FOR TESTING MEMORY LEAK
      ************************
      let s:variable = 1
      let s:counter = 1
      while s:variable < 2
      execute ":1w! " . s:counter . "test.txt"
      let s:counter = s:counter + 1
      endwhile
      ***************************

      Is there any option I can de- or activate to avoid this problem???

      I already tried:

      undolevels=-1
      noswapfile
      nobackup
      and some more i cant remember, sorry

      Any Ideas? Thx

      nikogh
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • ThoML
      ... Does an additional ... help? Regards, Thomas. --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist.
      Message 2 of 4 , Feb 29, 2008
      • 0 Attachment
        > while s:variable < 2
        > execute ":1w! " . s:counter . "test.txt"

        Does an additional

        > execute ":bwipeout " . s:counter . "test.txt"

        help?

        Regards,
        Thomas.

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • nikogh
        The :bw command is not helpful :( thx thomas any more ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use
        Message 3 of 4 , Mar 3, 2008
        • 0 Attachment
          The :bw command is not helpful :(

          thx thomas

          any more ideas?
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • nikogh
          Sorry, further tests showed the :bwipeout command saves memory :) !! It´s working fine :), only in the early cycles memory is increasing fast, afterwards
          Message 4 of 4 , Mar 3, 2008
          • 0 Attachment
            Sorry, further tests showed the :bwipeout command saves memory :) !!
            It´s working fine :), only in the early cycles memory is increasing
            fast, afterwards it´s becoming stable...

            THX a lot!


            On 29 Feb., 17:47, ThoML <micat...@...> wrote:
            > > while s:variable < 2
            > > execute ":1w! " . s:counter . "test.txt"
            >
            > Does an additional
            >
            > > execute ":bwipeout " . s:counter . "test.txt"
            >
            > help?
            >
            > Regards,
            > Thomas.
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.