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

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

Expand Messages
  • Jeff Lanzarotta
    Has this been fixed? Just wandering? ... Subject: Re: GVIM 5.7 for pc has memory leak! Date: 22 Jan 2001 03:15:35 GMT From: guckes@math.fu-berlin.de (Sven
    Message 1 of 3 , Jan 31, 2001
    • 0 Attachment
      Has this been fixed?

      Just wandering?

      -------- Original Message --------
      Subject: Re: GVIM 5.7 for pc has memory leak!
      Date: 22 Jan 2001 03:15:35 GMT
      From: guckes@...-berlin.de (Sven Guckes)
      Reply-To: guckes-usenet@...-berlin.de
      Organization: Freie Universitaet Berlin
      Newsgroups: comp.editors
      References: <3A69C888.2FC19B47@...>

      * 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);
      >
      > Another issues was resource leak: gui_w32.c
      > get_font_handle()
      > ...
      > font = CreateFontIndirect(lf);
      >
      > Is there a fix in the coming future?

      Which compiler and which flags did you use for making your binary?
      Does this bug affect the released binaries of gvim57?
      Does this bug affect all versions of vim?
      Do you have a patch for this? Then please send it to Bram.
      (See ":help bug-reports" for some info in this.) Thanks! :-)

      Sven
    • Bram Moolenaar
      ... Or wondering? I don t know of a memory leak. Please let me know how you discovered it. ... -- From know your smileys :
      Message 2 of 3 , Jan 31, 2001
      • 0 Attachment
        Jeff Lanzarotta wrote:

        > Has this been fixed?
        >
        > Just wandering?

        Or wondering?

        I don't know of a memory leak. Please let me know how you discovered it.

        * 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);
        >
        > Another issues was resource leak: gui_w32.c
        > get_font_handle()
        > ...
        > font = CreateFontIndirect(lf);
        >
        > Is there a fix in the coming future?

        --
        From "know your smileys":
        <|-) Chinese
        <|-( Chinese and doesn't like these kind of jokes

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • Vince Negri
        ... Err... let s see near start of WinMain: pszNewCmdLine = (char *)malloc(STRLEN(lpszCmdLine) + STRLEN(prog) + 4); at end of WinMain free(pszNewCmdLine); I
        Message 3 of 3 , 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

          free(pszNewCmdLine);

          I suspect that this is the hoary old business which has happened before...
          someone
          runs Vim using (for example) the VC debug libraries and gets "memory leak!"
          warnings
          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.

          Vince


          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.
        Your message has been successfully submitted and would be delivered to recipients shortly.