Doing this would make it easier for one to replace malloc() in Deadwood with something that more gracefully handles malloc() failures, such as blocking Deadwood until malloc() succeeds again, or by having malloc() failures terminate Deadwood and wrapping Deadwood in a script that restarts it when terminated. Since I am in debug, not develop mode, I have no plans to implement this kind of code myself. Deadwood was written for Linux and Windows; Linux does not, by default, have malloc() fail; it simply terminates processes that use too much memory.
For the record: MaraDNS terminates upon a malloc() failure. Deadwood's behavior is undefined should malloc() fail. If anyone is using MaraDNS in an environment where a kernel allows malloc() to return a NULL pointer, it is best to wrap MaraDNS in a script that restarts it when it terminates. If using Deadwood in an environment where malloc() may return NULL, please replace the dw_malloc() macro with a function that can properly handle a malloc() failure.
It can be downloaded here:
http://www.maradns.org/deadwood/snap/I plan to work on MaraDNS/Deadwood again one day next month in August, after the 20th, unless a critical security bug with a CVE number is found.
To post a comment about an entry, send me an email and I may or may not post your comment (with or without editing)