summaryrefslogtreecommitdiff
path: root/src/mongo/util/signal_handlers_synchronous.h
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2014-08-13 16:02:17 -0400
committerBenety Goh <benety@mongodb.com>2014-08-15 01:44:41 -0400
commitbe05259d36ec5f44c821c8f2d103a4ee83ebaf53 (patch)
tree08564e54e580e6dde94b7a5e89e8c4021fa457ef /src/mongo/util/signal_handlers_synchronous.h
parent7a1a0ce4ca6bbdf047adc7528310078ef7ca08f8 (diff)
downloadmongo-be05259d36ec5f44c821c8f2d103a4ee83ebaf53.tar.gz
SERVER-14889 wrapped all malloc/realloc calls within src/mongo with mongoMalloc/mongoRealloc.
if memory allocation fails, report error and exit.
Diffstat (limited to 'src/mongo/util/signal_handlers_synchronous.h')
-rw-r--r--src/mongo/util/signal_handlers_synchronous.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/util/signal_handlers_synchronous.h b/src/mongo/util/signal_handlers_synchronous.h
index 516e1d3acca..518fce03156 100644
--- a/src/mongo/util/signal_handlers_synchronous.h
+++ b/src/mongo/util/signal_handlers_synchronous.h
@@ -40,4 +40,14 @@ namespace mongo {
*/
void setupSynchronousSignalHandlers();
+ /**
+ * Report out of memory error with a stack trace and exit.
+ *
+ * Called when any of the following functions fails to allocate memory:
+ * operator new
+ * mongoMalloc
+ * mongoRealloc
+ */
+ void reportOutOfMemoryErrorAndExit();
+
} // namespace mongo