logo       

Re: Memory Usage and libpq: msg#00003

Subject: Re: Memory Usage and libpq
on 4/4/06 11:23 AM, terry@xxxxxxxx purportedly said:

> 
> On Tuesday 04 April 2006 03:14 pm, Keary Suska saith:
>> I am investigating a memory usage issue and I noticed something with libpq.
>> It appears that libpq doesn't actually free memory allocated to store
>> results, even after PQclear() is called. In a debug program I can inspect
>> the buffer so I know it exists. I haven't verified whether the buffer is
>> resized with subsequent calls, but when dealing with large result sets it
>> creates a significant memory overhead.
>> 
>> Am I on to something here or do I need to keep looking? If so, is there any
>> way that I can force libpq to free or in some way drastically reduce this
>> biffer?
> 
> I may be wrong about this, but just because you can access the memory after
> the call to PQclear, doesn't mean that the memory wasn't freed; it just means
> it hasn't been reused yet. The address still exists and freeing the memory
> doesn't "clear" it out.

It almost goes without saying, but it does encourage me to question whether
my debug program is showing deallocated memory, or further, if for some
reason the system/runtime isn't giving the memory back to the kernel
(something I am pursuing elsewhere). I will run a test of my own and see if
my debug program is showing deallocated memory.

Thanks,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe