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

Re: memory usage

Expand Messages
  • Matthew Winn
    On Wed, 30 Apr 2008 12:21:24 -0700, Lev Lvovsky ... It s not a problem. It s only a problem if you need that memory for something else.
    Message 1 of 21 , May 1, 2008
    • 0 Attachment
      On Wed, 30 Apr 2008 12:21:24 -0700, Lev Lvovsky <lists2@...>
      wrote:

      > I just upgraded to the latest version of vim, and am sadly still
      > having the problem of:
      >
      > 1. :vi big file
      > 2. use a lot of memory
      > 3. :bd big file
      > 4. still a lot of memory being used

      It's not a problem. It's only a problem if you need that memory for
      something else. It's actually more efficient for malloc to hang on
      to the memory than to try to compact it and return unused blocks to
      the system.

      > I don't know how vim manages it's memory, but in calling malloc and
      > getting a pointer to memory for a buffer, is free'ing the memory later
      > not possible?

      As I said before, in C it's not possible except in very special
      circumstances that aren't applicable in Vim's case.

      Anyway, it doesn't matter. Far too many people worry about memory
      use. Unless the use of memory is actually preventing you from doing
      something you shouldn't worry about it. Let the operating system
      take care of memory. As long as you're not actually running out of
      swap space the system can manage memory better than you can.

      --
      Matthew Winn

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