Обсуждение: curious memory leak

Поиск
Список
Период
Сортировка

curious memory leak

От
tim.brookes@cwcom.net
Дата:
I recently had problems with memory leaks when connecting to a postgres backend.The application and the backend both
eatmemory.
 

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