[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible memory leak in make 3.81
From: |
Paul Smith |
Subject: |
Re: possible memory leak in make 3.81 |
Date: |
Sun, 14 Oct 2007 12:39:38 -0400 |
On Sun, 2007-10-14 at 20:40 +0800, Zhongxing Xu wrote:
> In function library_search(),
> libpatterns and buf is malloced memory in line 1486 and 1553
> respectively.
> They are not freed.
> Is this true?
Correct, they are not freed--but no, this is not a memory leak. These
variables are declared static so the next time the function is invoked
they still point to that same memory buffer. This is just a way to
avoid allocating/freeing a local memory buffer over and over.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.us
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist