Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: base/allocator/allocator_shim_override_cpp_symbols.h

Issue 1675143004: Allocator shim skeleton + Linux impl behind a build flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shim_exp_flag
Patch Set: Make self the 1st arg Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifdef BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_CPP_SYMBOLS_H_
6 #error This header is meant to be included only once by allocator_shim.cc
7 #endif
8 #define BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_CPP_SYMBOLS_H_
9
10 // Alias the default new/delete C++ symbols to the shim entry points.
11 // This file is strongly inspired by tcmalloc's libc_override_redefine.h.
12
13 #include <new>
14
15 #include "base/allocator/allocator_shim_internals.h"
16
17 SHIM_ALWAYS_EXPORT void* operator new(size_t size)
18 SHIM_ALIAS_SYMBOL(ShimCppNew);
19
20 SHIM_ALWAYS_EXPORT void operator delete(void* p) __THROW
21 SHIM_ALIAS_SYMBOL(ShimCppDelete);
22
23 SHIM_ALWAYS_EXPORT void* operator new[](size_t size)
24 SHIM_ALIAS_SYMBOL(ShimCppNew);
25
26 SHIM_ALWAYS_EXPORT void operator delete[](void* p) __THROW
27 SHIM_ALIAS_SYMBOL(ShimCppDelete);
28
29 SHIM_ALWAYS_EXPORT void* operator new(size_t size,
30 const std::nothrow_t&) __THROW
31 SHIM_ALIAS_SYMBOL(ShimCppNew);
32
33 SHIM_ALWAYS_EXPORT void* operator new[](size_t size,
34 const std::nothrow_t&) __THROW
35 SHIM_ALIAS_SYMBOL(ShimCppNew);
36
37 SHIM_ALWAYS_EXPORT void operator delete(void* p, const std::nothrow_t&) __THROW
38 SHIM_ALIAS_SYMBOL(ShimCppDelete);
39
40 SHIM_ALWAYS_EXPORT void operator delete[](void* p,
41 const std::nothrow_t&) __THROW
42 SHIM_ALIAS_SYMBOL(ShimCppDelete);
OLDNEW
« no previous file with comments | « base/allocator/allocator_shim_internals.h ('k') | base/allocator/allocator_shim_override_glibc_weak_symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698