public inbox for [email protected]
help / color / mirror / Atom feedFrom: Thomas Hallgren <[email protected]>
To: [email protected]
Subject: Re: bug in GUC
Date: Thu, 24 Jun 2004 16:45:31 +0200
Message-ID: <[email protected]> (raw)
References: <[email protected]>
<[email protected]>
<[email protected]>
Ok, so I'm a newbie. To my defence I'll say that I made an effort to follow
the style previously used in guc.c. The unchecked mallocs I added where not
the first ;-)
So, what you are saying is that there's no need for the functions I
suggested and that a palloc using the TopMemoryContext will guarantee
correct behavior on "out of memory"?
Kind regards,
Thomas Hallgren
"Tom Lane" <[email protected]> wrote in message
news:[email protected]...
> "Thomas Hallgren" <[email protected]> writes:
> > Rather than clutter the code with the same ereport over and over again
(I
> > count 12 malloc's in guc.c alone), I'd like something like this:
>
> The larger question is why it contains even one. In general, use of
> malloc in the backend is the mark of a newbie. I'd think palloc in
> TopMemoryContext would be a more suitable approach.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: bug in GUC
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox