From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [INTERFACES] ECPG: FETCH ALL|n FROM cursor - Memory allocation? |
Date: | 2002-05-06 10:59:58 |
Message-ID: | 20020506105958.GD17805@feivel.credativ.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
On Mon, May 06, 2002 at 09:37:18AM +0200, Christof Petig wrote:
> Never, never mix these two! ECPGfree_auto_mem will free even memory
> which has already been free'd by the user, perhaps we should get rid of
That's why I discourage the usage of ECPGfree_auto_mem by the user.
There is only one reason why the symbol is not static and that is that
it is used by another module in libecpg.
I never thought about this as an end user routine, it's just meant as a
clean up method in case of an error during statement execution.
BTW Christof, ECPGfree_auto_mem is used by testdynalloc.pgc. Maybe we
should change that.
> this method (any allocated memory regions are stored in a list, if you
> never call ECPGfree_auto_mem, this list grows and grows).
That is not true. Before a statement is executed libecpg calls
ECPGclear_auto_mem which just frees ecpg's own structure but not the
memory used for data.
Michael
--
Michael Meskes
Michael(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2002-05-06 11:00:51 | Re: [INTERFACES] ECPG: FETCH ALL|n FROM cursor - Memory allocation? |
Previous Message | Hannu Krosing | 2002-05-06 10:48:32 | Re: Native Windows, Apache Portable Runtime |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2002-05-06 11:00:51 | Re: [INTERFACES] ECPG: FETCH ALL|n FROM cursor - Memory allocation? |
Previous Message | Lee Kindness | 2002-05-06 10:24:36 | Re: [INTERFACES] ECPG: FETCH ALL|n FROM cursor - Memory allocation? |