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

17843RE: [Fwd: Re: GVIM 5.7 for pc has memory leak!]

Expand Messages
  • Vince Negri
    Feb 1, 2001
    • 0 Attachment
      > * Yoong Hor Meng <yhm@...>:
      > > I compiled gvim 57 myself. I detected that there is a huge
      > > memory leak (about 68K). The biggest leak happen when vim/gvim
      > > call lalloc(size, message). It allocated memory but never free.
      > > Other are such as in os_w32exe.c
      > > pszNewCmdLine = (char *)malloc(STRLEN(lpszCmdLine) + STRLEN(prog) +
      > 4);
      Err... let's see
      near start of WinMain:

      pszNewCmdLine = (char *)malloc(STRLEN(lpszCmdLine) + STRLEN(prog) + 4);

      at end of WinMain


      I suspect that this is the hoary old business which has happened before...
      runs Vim using (for example) the VC debug libraries and gets "memory leak!"
      on exit, which are in fact for one-off allocations which Vim is letting the
      OS clean up
      at program exit, rather than waste time calling free() for everything. The
      point being
      that adding those free()'s wouldn't reduce Vim's memory footprint one iota.


      Legal Disclaimer: Any views expressed by the sender of this message are
      not necessarily those of Application Solutions Ltd. Information in this
      e-mail may be confidential and is for the use of the intended recipient
      only, no mistake in transmission is intended to waive or compromise such
      privilege. Please advise the sender if you receive this e-mail by mistake.
    • Show all 3 messages in this topic