Index: third_party/tcmalloc/chromium/src/base/abort.cc |
=================================================================== |
--- third_party/tcmalloc/chromium/src/base/abort.cc (revision 0) |
+++ third_party/tcmalloc/chromium/src/base/abort.cc (working copy) |
@@ -0,0 +1,24 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "base/abort.h" |
+ |
+#if defined(TCMALLOC_USE_SYSTEM_ABORT) |
+#include <stdlib.h> |
+#endif |
+#include "base/basictypes.h" |
+ |
+namespace tcmalloc { |
+ |
+// Don't inline so we can find Abort() call from stack trace. |
+ATTRIBUTE_NOINLINE void Abort() { |
+#if defined(TCMALLOC_USE_SYSTEM_ABORT) |
+ abort(); |
+#else |
+ // Make a segmentation fault to force abort. |
+ *reinterpret_cast<volatile int*>(NULL) = 0x2001; |
jar (doing other things)
2012/06/08 21:02:31
Suggest simplifying to never call system abort.
I
|
+#endif |
+} |
+ |
+} // namespace tcmalloc |
Property changes on: third_party/tcmalloc/chromium/src/base/abort.cc |
___________________________________________________________________ |
Added: svn:executable |
## -0,0 +1 ## |
+* |
\ No newline at end of property |