From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net> |
Cc: | Marko Kreen <markokr(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: The Axe list |
Date: | 2008-10-12 15:10:33 |
Message-ID: | 20081012151033.GB14629@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Oct 12, 2008 at 10:41:21AM -0400, D'Arcy J.M. Cain wrote:
> > > + if ((result = (char *) palloc(16)) != NULL)
> > > + {
> > > + result[0] = ':';
> > > + strcpy(result + 1, password->password);
> > > + }
> >
> > AFAIK palloc() cannot return NULL?
>
> Really? My program will simply come crashing down if there is a memory
> problem without giving me a chance to clean up?
If by "come crashing down" you mean "the transaction will be aborted,
all memory and other resources freed and the user gets a nice error
message", then yes. palloc will never return an invalid pointer.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2008-10-12 15:22:33 | Re: SELECT TOP %d PERCENT, or SELECT ... LIMIT %d PERCENT ? |
Previous Message | D'Arcy J.M. Cain | 2008-10-12 14:41:21 | Re: The Axe list |