about summary refs log tree commit diff
path: root/absl/base/internal/low_level_alloc.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-12-20T20·34-0800
committerXiaoyi Zhang <zhangxy988@gmail.com>2017-12-20T22·03-0500
commitff7045647330f5dc21725a42456091207f3eecd5 (patch)
treecae476d37e272b1a1d48172f07c4a7229a027fea /absl/base/internal/low_level_alloc.cc
parent4972c72c5cf2f27e2a0846ce9ff5d377d3f2b7af (diff)
Changes imported from Abseil "staging" branch:
  - 20f4e7133d695e9a05e13ebdfd4d78da310b42b5 Remove the warning supressions -Wno-documentation and by Derek Mauro <dmauro@google.com>
  - e1bde85c0571673b1e7a88b9d45a393606ba7e6c Changed the optimized version of strings_internal::JoinAl... by Abseil Team <absl-team@google.com>
  - 746e6716b4c15be61547670d68d25a1c850d3954 Add missing absl:: qualification. by Alex Strelnikov <strel@google.com>
  - 4e5c18c488cbd49ca72b02911cf22d830d5a7f16 Internals change: Remove the ability to pass a custom met... by Greg Falcon <gfalcon@google.com>
  - 65d58107a5730d4b6468bbffc72bea2f980af826 Moved most common character case (ascii printable) out of... by Abseil Team <absl-team@google.com>
  - f031331cc55a3d57b9110e12c7cbe50ac3e2a04f Add missing copyright headers to a few source files. by Greg Falcon <gfalcon@google.com>
  - 6035a77af6fa951c536b42df4c710d16d1817aec Enable libstdc++'s memcmp optimization in absl::equal for... by Abseil Team <absl-team@google.com>
  - 73a665a4a10781e5d89f75a876ece7ad859f4116 Fix minor spelling error "hexidecimal". by Abseil Team <absl-team@google.com>

GitOrigin-RevId: 20f4e7133d695e9a05e13ebdfd4d78da310b42b5
Change-Id: Id8c18ebd331d096935052a6ab259ebe0e2ef13ae
Diffstat (limited to 'absl/base/internal/low_level_alloc.cc')
-rw-r--r--absl/base/internal/low_level_alloc.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/absl/base/internal/low_level_alloc.cc b/absl/base/internal/low_level_alloc.cc
index 962232433665..5f047a54389a 100644
--- a/absl/base/internal/low_level_alloc.cc
+++ b/absl/base/internal/low_level_alloc.cc
@@ -358,18 +358,15 @@ LowLevelAlloc::Arena::Arena(uint32_t flags_value)
 }
 
 // L < meta_data_arena->mu
-LowLevelAlloc::Arena *LowLevelAlloc::NewArena(int32_t flags,
-                                              Arena *meta_data_arena) {
-  ABSL_RAW_CHECK(meta_data_arena != nullptr, "must pass a valid arena");
-  if (meta_data_arena == DefaultArena()) {
+LowLevelAlloc::Arena *LowLevelAlloc::NewArena(int32_t flags) {
+  Arena *meta_data_arena = DefaultArena();
 #ifndef ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING
-    if ((flags & LowLevelAlloc::kAsyncSignalSafe) != 0) {
-      meta_data_arena = UnhookedAsyncSigSafeArena();
-    } else  // NOLINT(readability/braces)
+  if ((flags & LowLevelAlloc::kAsyncSignalSafe) != 0) {
+    meta_data_arena = UnhookedAsyncSigSafeArena();
+  } else  // NOLINT(readability/braces)
 #endif
-        if ((flags & LowLevelAlloc::kCallMallocHook) == 0) {
-      meta_data_arena = UnhookedArena();
-    }
+      if ((flags & LowLevelAlloc::kCallMallocHook) == 0) {
+    meta_data_arena = UnhookedArena();
   }
   Arena *result =
     new (AllocWithArena(sizeof (*result), meta_data_arena)) Arena(flags);