Catching out-of-memory in patricia tree code.

Based on patch by Bill Parker.
This commit is contained in:
Robin Sommer 2012-12-03 14:50:33 -08:00
parent 63d43e6545
commit 05e6289719
5 changed files with 83 additions and 58 deletions

View file

@ -303,7 +303,7 @@ extern bool safe_write(int fd, const char* data, int len);
// Wraps close(2) to emit error messages and abort on unrecoverable errors.
extern void safe_close(int fd);
extern void out_of_memory(const char* where);
extern "C" void out_of_memory(const char* where);
inline void* safe_realloc(void* ptr, size_t size)
{