pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tim.brookes@cwcom.net
To: pgsql-interfaces@postgresql.org
Subject: curious memory leak
Date: Fri, 7 Jul 2000 20:54:18 +0100
Message-ID: <3966356a.6612.0@cwcom.net> (raw)

I recently had problems with memory leaks when connecting to a postgres backend.
 The application and the backend both eat memory.

Tom Lane help me with this problem and he found geprotobyname to be the problem
as the leak only seemed to be a problem when connecting over a tcp/ip connection.


However here are my new findings using v7.02

void callproc(){
   PgDatabase* loStatsdb;

   loStatsdb = new PgDatabase("")
   delete loStatsdb;

};

main(){
   while(1){
      callproc();
   };
};

database name is set as environment variable.

Starting the postmaster either with or without -i to enable tcp/ip connections
and running this code both locally and over tcp/ip the postmaster backend leaks
memory.

The application now remains stable and has no memory leak.


Rgds
Tim Brookes



Message-ID: <3966356a.6612.0@cwcom.net>
Permalink:  ../3966356a.6612.0@cwcom.net/
Also on:    postgresql.org/message-id/3966356a.6612.0@cwcom.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tim.brookes@cwcom.net
  Subject: Re: curious memory leak
  In-Reply-To: <3966356a.6612.0@cwcom.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox