From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: malloc in xlog.c |
Date: | 2002-12-17 18:39:11 |
Message-ID: | 9794.1040150351@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> I see a few malloc's in backend/access/transam/xlog.c that don't check
> to see if malloc returns NULL/failure. I think there should be at least
> an Assert() in there.
It'll dump core just fine without the help of an Assert ;-). I don't
see that an Assert adds much of anything.
In practice those mallocs are done during startup, so it seems very
unlikely that they could fail, anyway.
> Also, seems we use malloc() a few other places where palloc should be
> used, like variable.c. Is that correct?
Those are correct because of guc.c's conventions. Note the comments.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Roderick A. Anderson | 2002-12-17 19:10:19 | Re: Update on replication |
Previous Message | Matthew Kirkwood | 2002-12-17 18:38:11 | Re: Suggestion; "WITH VACUUM" option |