Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Memory Usage and libpq



Keary Suska <hierophant(at)pcisys(dot)net> writes:
> 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.

This would depend entirely on how malloc/free are implemented on your
platform.  Some versions can release space back to the OS, some can't.
In some it depends on what else has been allocated.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group