[mapserver-dev] Ticket 3559 - malloc/calloc/realloc return values
should always be checked
Pierre Mauduit
pierre.mauduit at camptocamp.com
Thu Oct 7 11:08:42 EDT 2010
Hi,
> #define CHECK_ALLOC(a) if (!(a)) { fprintf(stderr, "%s: %d: Memory
> allocation failed! exiting at %s!\n", __FILE__, __LINE__); exit(1); }
>
>
If I may suggest something, I don't know if it is a good idea to multiply
the exit() calls ; wouldn't it be more relevant to have centralized exit()
calls ? (into the main loop for example). For example, in a FastCGI setup,
your process is not even supposed to exit() ; that issue reminds me a patch
I proposed several weeks ago (issue #3099 [1]).
well, if the process is unable to allocate memory, it would probably not
survive a long time before being killed by a OOmKiller call anyway ;
my 2 cents,
[1]
http://trac.osgeo.org/mapserver/attachment/ticket/3099/mapserv_fcgi.patch
--
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20101007/70af362c/attachment.html
More information about the mapserver-dev
mailing list