On Wed, 8 Apr 2009 22:07:55 +0300 Juha Korhonen <mahtav...@gmail.com> wrote:
> Hi, when I use apr_palloc function to allocate memory, should I check > the return value to make sure that I really got some memory? Yes. Sort-of. That is to say, yes you should, but it's common practice to omit the test, on the dubious grounds that if pool allocation fails, then your error handling is pretty-much going to fail for the same reason so it's pointless. With apr exploring entirely different allocators, that excuse looks ever more suspect. So, yes, you're right. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/