Re: [HACKERS] 6.1 progress
| От | The Hermit Hacker |
|---|---|
| Тема | Re: [HACKERS] 6.1 progress |
| Дата | |
| Msg-id | 9cca203e068cb0668236ecfa1c84f572 обсуждение |
| Ответ на | [HACKERS] 6.1 progress (Bruce Momjian <maillist@candle.pha.pa.us>) |
| Список | pgsql-hackers |
On Mon, 2 Jun 1997, Bruce Momjian wrote:
> >
> > Well, one of the leaks that Purify detected was that individual lines read
> > from files were malloc'ed but not freed properly. So, if a line is
> > malloc'ed to about 8K (and we are reading thousands of lines in COPY reg
> > test I believe) and is not freed before next line is read, we get
> > significant memory usage... Plus adding all other leaks we get into major
> > problems...
> >
> > I fixed the 'lines' leak so we shall see what happens...The backend should
> > be interesting...
>
> Because of the postgresql memory manager, some of the leaks are
> auto-cleaned after every statement/transaction, so it may not be too
> bad. Or it may be.
Actually, that would only free up memory for the backend, no? I
think the problem that Igor is reporting is that in psql itself, we are
doing (if I remember the patch correctly):
line = malloc();
fgets(line);
But never did a free(line); after we were finished with the
data in line, just assigning a new memory segment to it...
Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
------------------------------
В списке pgsql-hackers по дате отправления: