|
12 | 12 | <H1>Developer's Frequently Asked Questions (FAQ) for
|
13 | 13 | PostgreSQL</H1>
|
14 | 14 |
|
15 |
| -<P>Last updated:Sat Dec 29 23:31:26 EST2001</P> |
| 15 | +<P>Last updated:Thu Jan 3 03:13:44 EST2002</P> |
16 | 16 |
|
17 | 17 | <P>Current maintainer: Bruce Momjian (<Ahref=
|
18 | 18 | "mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
@@ -766,12 +766,12 @@ <H3><A name="2.5">2.5</A>) Why do we use <I>palloc</I>() and
|
766 | 766 | <I>pfree</I>() to allocate memory?</H3>
|
767 | 767 |
|
768 | 768 | <P><I>palloc()</I> and<I>pfree()</I> are used in place of malloc()
|
769 |
| - and free() because weautomatically free all memory allocated when |
770 |
| -a transaction completes. Thismakes it easier to make sure we free |
771 |
| - memory thatgets allocatedin one place, but only freed much later. |
772 |
| -There are several contexts that memory can be allocated in, and |
773 |
| -this controls when theallocatedmemory is automatically freed by |
774 |
| - the backend.</P> |
| 769 | + and free() because wefind it easier to automatically free all |
| 770 | +memory allocated when a query completes. Thisassures us that all |
| 771 | + memory thatwas allocatedgets freed even if we have lost track of |
| 772 | +where we allocated it. There are special non-query contexts that |
| 773 | +memory can beallocatedin. These affect when the allocated memory |
| 774 | +is freed bythe backend.</P> |
775 | 775 |
|
776 | 776 | <H3><Aname="2.6">2.6</A>) What is elog()?</H3>
|
777 | 777 |
|
|