no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / memory / mozalloc / cxxalloc.cpp
blob41f419fe2dd663dea6e374ca8c2018e6d3f11657
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #define MOZ_MEMORY_IMPL
6 #include "mozmemory_wrap.h"
7 #define MALLOC_FUNCS MALLOC_FUNCS_MALLOC
8 // See mozmemory_wrap.h for more details. Files that are part of libmozglue,
9 // need to use _impl suffixes, which is becoming cumbersome. We'll have to use
10 // something like a malloc.h wrapper and allow the use of the functions without
11 // a _impl suffix. In the meanwhile, this is enough to get by for C++ code.
12 #define MALLOC_DECL(name, return_type, ...) \
13 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
14 #include "malloc_decls.h"
16 #include "mozilla/Attributes.h"
18 extern "C" MFBT_API void* moz_xmalloc(size_t size) MOZ_INFALLIBLE_ALLOCATOR;
20 namespace std {
21 struct nothrow_t;
24 #define MOZALLOC_EXPORT_NEW MFBT_API
26 #include "mozilla/cxxalloc.h"