Search Postgresql Archives

Libpq memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Program written in C using Libpq, which receives large files (BYTEA)
has a memory leak.
I need to free ALL of the used memory after each sql query.

after each call PQclear() I drop the buffer:
    conn->inBuffer = realloc(conn->inBuffer, 8192);
    conn->inBufSize = 8192;

It works, but ..
I noticed that in some cases PQclear() does not clear the memory.
This happens only when the program receives certain files...

Maybe there's some buffers that should make realloc()?
Or is it a bug?

versions tested 9.0.0 and 8.4.4

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux