Re: BUG #3881: lo_open leaks memory - Mailing list pgsql-bugs

From Tomasz Ostrowski
Subject Re: BUG #3881: lo_open leaks memory
Date
Msg-id 20080122141915.GD3111@batory.org.pl
Whole thread Raw
In response to Re: BUG #3881: lo_open leaks memory  (Michael Akinde <michael.akinde@met.no>)
Responses Re: BUG #3881: lo_open leaks memory
List pgsql-bugs
On Tue, 22 Jan 2008, Michael Akinde wrote:

>> What I *do* see is that the process size as reported by "top"
>> quickly jumps to 900MB plus and then sits there.  This is not a
>> memory leak though, it is just a side effect of the way "top"
>> reports usage of shared memory.
>
> Also, since the blob is opened and closed, why does the process allocate
> new memory to open a new blob, rather than reuse existing memory?

I think a process does not allocate new memory, it just uses his
shared buffer. The OS does not give physical memory for a process
immediately when it is allocated for example by malloc, it gives it
in chunks - only when it is first read or written to.

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

pgsql-bugs by date:

Previous
From: Michael Akinde
Date:
Subject: Re: BUG #3881: lo_open leaks memory
Next
From: Michael Akinde
Date:
Subject: Re: BUG #3881: lo_open leaks memory