1*9356374aSAndroid Build Coastguard Worker // Copyright 2017 The Abseil Authors.
2*9356374aSAndroid Build Coastguard Worker //
3*9356374aSAndroid Build Coastguard Worker // Licensed under the Apache License, Version 2.0 (the "License");
4*9356374aSAndroid Build Coastguard Worker // you may not use this file except in compliance with the License.
5*9356374aSAndroid Build Coastguard Worker // You may obtain a copy of the License at
6*9356374aSAndroid Build Coastguard Worker //
7*9356374aSAndroid Build Coastguard Worker // https://www.apache.org/licenses/LICENSE-2.0
8*9356374aSAndroid Build Coastguard Worker //
9*9356374aSAndroid Build Coastguard Worker // Unless required by applicable law or agreed to in writing, software
10*9356374aSAndroid Build Coastguard Worker // distributed under the License is distributed on an "AS IS" BASIS,
11*9356374aSAndroid Build Coastguard Worker // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*9356374aSAndroid Build Coastguard Worker // See the License for the specific language governing permissions and
13*9356374aSAndroid Build Coastguard Worker // limitations under the License.
14*9356374aSAndroid Build Coastguard Worker //
15*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
16*9356374aSAndroid Build Coastguard Worker // File: memory.h
17*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
18*9356374aSAndroid Build Coastguard Worker //
19*9356374aSAndroid Build Coastguard Worker // This header file contains utility functions for managing the creation and
20*9356374aSAndroid Build Coastguard Worker // conversion of smart pointers. This file is an extension to the C++
21*9356374aSAndroid Build Coastguard Worker // standard <memory> library header file.
22*9356374aSAndroid Build Coastguard Worker
23*9356374aSAndroid Build Coastguard Worker #ifndef ABSL_MEMORY_MEMORY_H_
24*9356374aSAndroid Build Coastguard Worker #define ABSL_MEMORY_MEMORY_H_
25*9356374aSAndroid Build Coastguard Worker
26*9356374aSAndroid Build Coastguard Worker #include <cstddef>
27*9356374aSAndroid Build Coastguard Worker #include <limits>
28*9356374aSAndroid Build Coastguard Worker #include <memory>
29*9356374aSAndroid Build Coastguard Worker #include <new>
30*9356374aSAndroid Build Coastguard Worker #include <type_traits>
31*9356374aSAndroid Build Coastguard Worker #include <utility>
32*9356374aSAndroid Build Coastguard Worker
33*9356374aSAndroid Build Coastguard Worker #include "absl/base/macros.h"
34*9356374aSAndroid Build Coastguard Worker #include "absl/meta/type_traits.h"
35*9356374aSAndroid Build Coastguard Worker
36*9356374aSAndroid Build Coastguard Worker namespace absl {
37*9356374aSAndroid Build Coastguard Worker ABSL_NAMESPACE_BEGIN
38*9356374aSAndroid Build Coastguard Worker
39*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
40*9356374aSAndroid Build Coastguard Worker // Function Template: WrapUnique()
41*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
42*9356374aSAndroid Build Coastguard Worker //
43*9356374aSAndroid Build Coastguard Worker // Adopts ownership from a raw pointer and transfers it to the returned
44*9356374aSAndroid Build Coastguard Worker // `std::unique_ptr`, whose type is deduced. Because of this deduction, *do not*
45*9356374aSAndroid Build Coastguard Worker // specify the template type `T` when calling `WrapUnique`.
46*9356374aSAndroid Build Coastguard Worker //
47*9356374aSAndroid Build Coastguard Worker // Example:
48*9356374aSAndroid Build Coastguard Worker // X* NewX(int, int);
49*9356374aSAndroid Build Coastguard Worker // auto x = WrapUnique(NewX(1, 2)); // 'x' is std::unique_ptr<X>.
50*9356374aSAndroid Build Coastguard Worker //
51*9356374aSAndroid Build Coastguard Worker // Do not call WrapUnique with an explicit type, as in
52*9356374aSAndroid Build Coastguard Worker // `WrapUnique<X>(NewX(1, 2))`. The purpose of WrapUnique is to automatically
53*9356374aSAndroid Build Coastguard Worker // deduce the pointer type. If you wish to make the type explicit, just use
54*9356374aSAndroid Build Coastguard Worker // `std::unique_ptr` directly.
55*9356374aSAndroid Build Coastguard Worker //
56*9356374aSAndroid Build Coastguard Worker // auto x = std::unique_ptr<X>(NewX(1, 2));
57*9356374aSAndroid Build Coastguard Worker // - or -
58*9356374aSAndroid Build Coastguard Worker // std::unique_ptr<X> x(NewX(1, 2));
59*9356374aSAndroid Build Coastguard Worker //
60*9356374aSAndroid Build Coastguard Worker // While `absl::WrapUnique` is useful for capturing the output of a raw
61*9356374aSAndroid Build Coastguard Worker // pointer factory, prefer 'absl::make_unique<T>(args...)' over
62*9356374aSAndroid Build Coastguard Worker // 'absl::WrapUnique(new T(args...))'.
63*9356374aSAndroid Build Coastguard Worker //
64*9356374aSAndroid Build Coastguard Worker // auto x = WrapUnique(new X(1, 2)); // works, but nonideal.
65*9356374aSAndroid Build Coastguard Worker // auto x = make_unique<X>(1, 2); // safer, standard, avoids raw 'new'.
66*9356374aSAndroid Build Coastguard Worker //
67*9356374aSAndroid Build Coastguard Worker // Note that `absl::WrapUnique(p)` is valid only if `delete p` is a valid
68*9356374aSAndroid Build Coastguard Worker // expression. In particular, `absl::WrapUnique()` cannot wrap pointers to
69*9356374aSAndroid Build Coastguard Worker // arrays, functions or void, and it must not be used to capture pointers
70*9356374aSAndroid Build Coastguard Worker // obtained from array-new expressions (even though that would compile!).
71*9356374aSAndroid Build Coastguard Worker template <typename T>
WrapUnique(T * ptr)72*9356374aSAndroid Build Coastguard Worker std::unique_ptr<T> WrapUnique(T* ptr) {
73*9356374aSAndroid Build Coastguard Worker static_assert(!std::is_array<T>::value, "array types are unsupported");
74*9356374aSAndroid Build Coastguard Worker static_assert(std::is_object<T>::value, "non-object types are unsupported");
75*9356374aSAndroid Build Coastguard Worker return std::unique_ptr<T>(ptr);
76*9356374aSAndroid Build Coastguard Worker }
77*9356374aSAndroid Build Coastguard Worker
78*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
79*9356374aSAndroid Build Coastguard Worker // Function Template: make_unique<T>()
80*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
81*9356374aSAndroid Build Coastguard Worker //
82*9356374aSAndroid Build Coastguard Worker // Creates a `std::unique_ptr<>`, while avoiding issues creating temporaries
83*9356374aSAndroid Build Coastguard Worker // during the construction process. `absl::make_unique<>` also avoids redundant
84*9356374aSAndroid Build Coastguard Worker // type declarations, by avoiding the need to explicitly use the `new` operator.
85*9356374aSAndroid Build Coastguard Worker //
86*9356374aSAndroid Build Coastguard Worker // https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique
87*9356374aSAndroid Build Coastguard Worker //
88*9356374aSAndroid Build Coastguard Worker // For more background on why `std::unique_ptr<T>(new T(a,b))` is problematic,
89*9356374aSAndroid Build Coastguard Worker // see Herb Sutter's explanation on
90*9356374aSAndroid Build Coastguard Worker // (Exception-Safe Function Calls)[https://herbsutter.com/gotw/_102/].
91*9356374aSAndroid Build Coastguard Worker // (In general, reviewers should treat `new T(a,b)` with scrutiny.)
92*9356374aSAndroid Build Coastguard Worker //
93*9356374aSAndroid Build Coastguard Worker // Historical note: Abseil once provided a C++11 compatible implementation of
94*9356374aSAndroid Build Coastguard Worker // the C++14's `std::make_unique`. Now that C++11 support has been sunsetted,
95*9356374aSAndroid Build Coastguard Worker // `absl::make_unique` simply uses the STL-provided implementation. New code
96*9356374aSAndroid Build Coastguard Worker // should use `std::make_unique`.
97*9356374aSAndroid Build Coastguard Worker using std::make_unique;
98*9356374aSAndroid Build Coastguard Worker
99*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
100*9356374aSAndroid Build Coastguard Worker // Function Template: RawPtr()
101*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
102*9356374aSAndroid Build Coastguard Worker //
103*9356374aSAndroid Build Coastguard Worker // Extracts the raw pointer from a pointer-like value `ptr`. `absl::RawPtr` is
104*9356374aSAndroid Build Coastguard Worker // useful within templates that need to handle a complement of raw pointers,
105*9356374aSAndroid Build Coastguard Worker // `std::nullptr_t`, and smart pointers.
106*9356374aSAndroid Build Coastguard Worker template <typename T>
107*9356374aSAndroid Build Coastguard Worker auto RawPtr(T&& ptr) -> decltype(std::addressof(*ptr)) {
108*9356374aSAndroid Build Coastguard Worker // ptr is a forwarding reference to support Ts with non-const operators.
109*9356374aSAndroid Build Coastguard Worker return (ptr != nullptr) ? std::addressof(*ptr) : nullptr;
110*9356374aSAndroid Build Coastguard Worker }
RawPtr(std::nullptr_t)111*9356374aSAndroid Build Coastguard Worker inline std::nullptr_t RawPtr(std::nullptr_t) { return nullptr; }
112*9356374aSAndroid Build Coastguard Worker
113*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
114*9356374aSAndroid Build Coastguard Worker // Function Template: ShareUniquePtr()
115*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
116*9356374aSAndroid Build Coastguard Worker //
117*9356374aSAndroid Build Coastguard Worker // Adopts a `std::unique_ptr` rvalue and returns a `std::shared_ptr` of deduced
118*9356374aSAndroid Build Coastguard Worker // type. Ownership (if any) of the held value is transferred to the returned
119*9356374aSAndroid Build Coastguard Worker // shared pointer.
120*9356374aSAndroid Build Coastguard Worker //
121*9356374aSAndroid Build Coastguard Worker // Example:
122*9356374aSAndroid Build Coastguard Worker //
123*9356374aSAndroid Build Coastguard Worker // auto up = absl::make_unique<int>(10);
124*9356374aSAndroid Build Coastguard Worker // auto sp = absl::ShareUniquePtr(std::move(up)); // shared_ptr<int>
125*9356374aSAndroid Build Coastguard Worker // CHECK_EQ(*sp, 10);
126*9356374aSAndroid Build Coastguard Worker // CHECK(up == nullptr);
127*9356374aSAndroid Build Coastguard Worker //
128*9356374aSAndroid Build Coastguard Worker // Note that this conversion is correct even when T is an array type, and more
129*9356374aSAndroid Build Coastguard Worker // generally it works for *any* deleter of the `unique_ptr` (single-object
130*9356374aSAndroid Build Coastguard Worker // deleter, array deleter, or any custom deleter), since the deleter is adopted
131*9356374aSAndroid Build Coastguard Worker // by the shared pointer as well. The deleter is copied (unless it is a
132*9356374aSAndroid Build Coastguard Worker // reference).
133*9356374aSAndroid Build Coastguard Worker //
134*9356374aSAndroid Build Coastguard Worker // Implements the resolution of [LWG 2415](http://wg21.link/lwg2415), by which a
135*9356374aSAndroid Build Coastguard Worker // null shared pointer does not attempt to call the deleter.
136*9356374aSAndroid Build Coastguard Worker template <typename T, typename D>
ShareUniquePtr(std::unique_ptr<T,D> && ptr)137*9356374aSAndroid Build Coastguard Worker std::shared_ptr<T> ShareUniquePtr(std::unique_ptr<T, D>&& ptr) {
138*9356374aSAndroid Build Coastguard Worker return ptr ? std::shared_ptr<T>(std::move(ptr)) : std::shared_ptr<T>();
139*9356374aSAndroid Build Coastguard Worker }
140*9356374aSAndroid Build Coastguard Worker
141*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
142*9356374aSAndroid Build Coastguard Worker // Function Template: WeakenPtr()
143*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
144*9356374aSAndroid Build Coastguard Worker //
145*9356374aSAndroid Build Coastguard Worker // Creates a weak pointer associated with a given shared pointer. The returned
146*9356374aSAndroid Build Coastguard Worker // value is a `std::weak_ptr` of deduced type.
147*9356374aSAndroid Build Coastguard Worker //
148*9356374aSAndroid Build Coastguard Worker // Example:
149*9356374aSAndroid Build Coastguard Worker //
150*9356374aSAndroid Build Coastguard Worker // auto sp = std::make_shared<int>(10);
151*9356374aSAndroid Build Coastguard Worker // auto wp = absl::WeakenPtr(sp);
152*9356374aSAndroid Build Coastguard Worker // CHECK_EQ(sp.get(), wp.lock().get());
153*9356374aSAndroid Build Coastguard Worker // sp.reset();
154*9356374aSAndroid Build Coastguard Worker // CHECK(wp.lock() == nullptr);
155*9356374aSAndroid Build Coastguard Worker //
156*9356374aSAndroid Build Coastguard Worker template <typename T>
WeakenPtr(const std::shared_ptr<T> & ptr)157*9356374aSAndroid Build Coastguard Worker std::weak_ptr<T> WeakenPtr(const std::shared_ptr<T>& ptr) {
158*9356374aSAndroid Build Coastguard Worker return std::weak_ptr<T>(ptr);
159*9356374aSAndroid Build Coastguard Worker }
160*9356374aSAndroid Build Coastguard Worker
161*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
162*9356374aSAndroid Build Coastguard Worker // Class Template: pointer_traits
163*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
164*9356374aSAndroid Build Coastguard Worker //
165*9356374aSAndroid Build Coastguard Worker // Historical note: Abseil once provided an implementation of
166*9356374aSAndroid Build Coastguard Worker // `std::pointer_traits` for platforms that had not yet provided it. Those
167*9356374aSAndroid Build Coastguard Worker // platforms are no longer supported. New code should simply use
168*9356374aSAndroid Build Coastguard Worker // `std::pointer_traits`.
169*9356374aSAndroid Build Coastguard Worker using std::pointer_traits;
170*9356374aSAndroid Build Coastguard Worker
171*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
172*9356374aSAndroid Build Coastguard Worker // Class Template: allocator_traits
173*9356374aSAndroid Build Coastguard Worker // -----------------------------------------------------------------------------
174*9356374aSAndroid Build Coastguard Worker //
175*9356374aSAndroid Build Coastguard Worker // Historical note: Abseil once provided an implementation of
176*9356374aSAndroid Build Coastguard Worker // `std::allocator_traits` for platforms that had not yet provided it. Those
177*9356374aSAndroid Build Coastguard Worker // platforms are no longer supported. New code should simply use
178*9356374aSAndroid Build Coastguard Worker // `std::allocator_traits`.
179*9356374aSAndroid Build Coastguard Worker using std::allocator_traits;
180*9356374aSAndroid Build Coastguard Worker
181*9356374aSAndroid Build Coastguard Worker namespace memory_internal {
182*9356374aSAndroid Build Coastguard Worker
183*9356374aSAndroid Build Coastguard Worker // ExtractOr<E, O, D>::type evaluates to E<O> if possible. Otherwise, D.
184*9356374aSAndroid Build Coastguard Worker template <template <typename> class Extract, typename Obj, typename Default,
185*9356374aSAndroid Build Coastguard Worker typename>
186*9356374aSAndroid Build Coastguard Worker struct ExtractOr {
187*9356374aSAndroid Build Coastguard Worker using type = Default;
188*9356374aSAndroid Build Coastguard Worker };
189*9356374aSAndroid Build Coastguard Worker
190*9356374aSAndroid Build Coastguard Worker template <template <typename> class Extract, typename Obj, typename Default>
191*9356374aSAndroid Build Coastguard Worker struct ExtractOr<Extract, Obj, Default, void_t<Extract<Obj>>> {
192*9356374aSAndroid Build Coastguard Worker using type = Extract<Obj>;
193*9356374aSAndroid Build Coastguard Worker };
194*9356374aSAndroid Build Coastguard Worker
195*9356374aSAndroid Build Coastguard Worker template <template <typename> class Extract, typename Obj, typename Default>
196*9356374aSAndroid Build Coastguard Worker using ExtractOrT = typename ExtractOr<Extract, Obj, Default, void>::type;
197*9356374aSAndroid Build Coastguard Worker
198*9356374aSAndroid Build Coastguard Worker // This template alias transforms Alloc::is_nothrow into a metafunction with
199*9356374aSAndroid Build Coastguard Worker // Alloc as a parameter so it can be used with ExtractOrT<>.
200*9356374aSAndroid Build Coastguard Worker template <typename Alloc>
201*9356374aSAndroid Build Coastguard Worker using GetIsNothrow = typename Alloc::is_nothrow;
202*9356374aSAndroid Build Coastguard Worker
203*9356374aSAndroid Build Coastguard Worker } // namespace memory_internal
204*9356374aSAndroid Build Coastguard Worker
205*9356374aSAndroid Build Coastguard Worker // ABSL_ALLOCATOR_NOTHROW is a build time configuration macro for user to
206*9356374aSAndroid Build Coastguard Worker // specify whether the default allocation function can throw or never throws.
207*9356374aSAndroid Build Coastguard Worker // If the allocation function never throws, user should define it to a non-zero
208*9356374aSAndroid Build Coastguard Worker // value (e.g. via `-DABSL_ALLOCATOR_NOTHROW`).
209*9356374aSAndroid Build Coastguard Worker // If the allocation function can throw, user should leave it undefined or
210*9356374aSAndroid Build Coastguard Worker // define it to zero.
211*9356374aSAndroid Build Coastguard Worker //
212*9356374aSAndroid Build Coastguard Worker // allocator_is_nothrow<Alloc> is a traits class that derives from
213*9356374aSAndroid Build Coastguard Worker // Alloc::is_nothrow if present, otherwise std::false_type. It's specialized
214*9356374aSAndroid Build Coastguard Worker // for Alloc = std::allocator<T> for any type T according to the state of
215*9356374aSAndroid Build Coastguard Worker // ABSL_ALLOCATOR_NOTHROW.
216*9356374aSAndroid Build Coastguard Worker //
217*9356374aSAndroid Build Coastguard Worker // default_allocator_is_nothrow is a class that derives from std::true_type
218*9356374aSAndroid Build Coastguard Worker // when the default allocator (global operator new) never throws, and
219*9356374aSAndroid Build Coastguard Worker // std::false_type when it can throw. It is a convenience shorthand for writing
220*9356374aSAndroid Build Coastguard Worker // allocator_is_nothrow<std::allocator<T>> (T can be any type).
221*9356374aSAndroid Build Coastguard Worker // NOTE: allocator_is_nothrow<std::allocator<T>> is guaranteed to derive from
222*9356374aSAndroid Build Coastguard Worker // the same type for all T, because users should specialize neither
223*9356374aSAndroid Build Coastguard Worker // allocator_is_nothrow nor std::allocator.
224*9356374aSAndroid Build Coastguard Worker template <typename Alloc>
225*9356374aSAndroid Build Coastguard Worker struct allocator_is_nothrow
226*9356374aSAndroid Build Coastguard Worker : memory_internal::ExtractOrT<memory_internal::GetIsNothrow, Alloc,
227*9356374aSAndroid Build Coastguard Worker std::false_type> {};
228*9356374aSAndroid Build Coastguard Worker
229*9356374aSAndroid Build Coastguard Worker #if defined(ABSL_ALLOCATOR_NOTHROW) && ABSL_ALLOCATOR_NOTHROW
230*9356374aSAndroid Build Coastguard Worker template <typename T>
231*9356374aSAndroid Build Coastguard Worker struct allocator_is_nothrow<std::allocator<T>> : std::true_type {};
232*9356374aSAndroid Build Coastguard Worker struct default_allocator_is_nothrow : std::true_type {};
233*9356374aSAndroid Build Coastguard Worker #else
234*9356374aSAndroid Build Coastguard Worker struct default_allocator_is_nothrow : std::false_type {};
235*9356374aSAndroid Build Coastguard Worker #endif
236*9356374aSAndroid Build Coastguard Worker
237*9356374aSAndroid Build Coastguard Worker namespace memory_internal {
238*9356374aSAndroid Build Coastguard Worker template <typename Allocator, typename Iterator, typename... Args>
239*9356374aSAndroid Build Coastguard Worker void ConstructRange(Allocator& alloc, Iterator first, Iterator last,
240*9356374aSAndroid Build Coastguard Worker const Args&... args) {
241*9356374aSAndroid Build Coastguard Worker for (Iterator cur = first; cur != last; ++cur) {
242*9356374aSAndroid Build Coastguard Worker ABSL_INTERNAL_TRY {
243*9356374aSAndroid Build Coastguard Worker std::allocator_traits<Allocator>::construct(alloc, std::addressof(*cur),
244*9356374aSAndroid Build Coastguard Worker args...);
245*9356374aSAndroid Build Coastguard Worker }
246*9356374aSAndroid Build Coastguard Worker ABSL_INTERNAL_CATCH_ANY {
247*9356374aSAndroid Build Coastguard Worker while (cur != first) {
248*9356374aSAndroid Build Coastguard Worker --cur;
249*9356374aSAndroid Build Coastguard Worker std::allocator_traits<Allocator>::destroy(alloc, std::addressof(*cur));
250*9356374aSAndroid Build Coastguard Worker }
251*9356374aSAndroid Build Coastguard Worker ABSL_INTERNAL_RETHROW;
252*9356374aSAndroid Build Coastguard Worker }
253*9356374aSAndroid Build Coastguard Worker }
254*9356374aSAndroid Build Coastguard Worker }
255*9356374aSAndroid Build Coastguard Worker
256*9356374aSAndroid Build Coastguard Worker template <typename Allocator, typename Iterator, typename InputIterator>
257*9356374aSAndroid Build Coastguard Worker void CopyRange(Allocator& alloc, Iterator destination, InputIterator first,
258*9356374aSAndroid Build Coastguard Worker InputIterator last) {
259*9356374aSAndroid Build Coastguard Worker for (Iterator cur = destination; first != last;
260*9356374aSAndroid Build Coastguard Worker static_cast<void>(++cur), static_cast<void>(++first)) {
261*9356374aSAndroid Build Coastguard Worker ABSL_INTERNAL_TRY {
262*9356374aSAndroid Build Coastguard Worker std::allocator_traits<Allocator>::construct(alloc, std::addressof(*cur),
263*9356374aSAndroid Build Coastguard Worker *first);
264*9356374aSAndroid Build Coastguard Worker }
265*9356374aSAndroid Build Coastguard Worker ABSL_INTERNAL_CATCH_ANY {
266*9356374aSAndroid Build Coastguard Worker while (cur != destination) {
267*9356374aSAndroid Build Coastguard Worker --cur;
268*9356374aSAndroid Build Coastguard Worker std::allocator_traits<Allocator>::destroy(alloc, std::addressof(*cur));
269*9356374aSAndroid Build Coastguard Worker }
270*9356374aSAndroid Build Coastguard Worker ABSL_INTERNAL_RETHROW;
271*9356374aSAndroid Build Coastguard Worker }
272*9356374aSAndroid Build Coastguard Worker }
273*9356374aSAndroid Build Coastguard Worker }
274*9356374aSAndroid Build Coastguard Worker } // namespace memory_internal
275*9356374aSAndroid Build Coastguard Worker ABSL_NAMESPACE_END
276*9356374aSAndroid Build Coastguard Worker } // namespace absl
277*9356374aSAndroid Build Coastguard Worker
278*9356374aSAndroid Build Coastguard Worker #endif // ABSL_MEMORY_MEMORY_H_
279