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

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

Issue 1719433002: Introduce allocator shim for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shim_traceintegration
Patch Set: Add readme changes, do NOT enabled by default in this cl Created 4 years, 8 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_LINKER_WRAPPED_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_LINKER_WRAPPED_SYMBOLS_H_
9
10 // This header overrides the __wrap_X symbols when using the link-time
11 // -Wl,-wrap,malloc shim-layer approach (see README.md).
12 // All references to malloc, free, etc. within the linker unit that gets the
13 // -wrap linker flags (e.g., libchrome_public.so) will be rewritten to the
14 // linker as references to __wrap_malloc, __wrap_free, which are defined here.
15
16 #include "base/allocator/allocator_shim_internals.h"
17
18 extern "C" {
19
20 SHIM_ALWAYS_EXPORT void* __wrap_calloc(size_t, size_t)
21 SHIM_ALIAS_SYMBOL(ShimCalloc);
22
23 SHIM_ALWAYS_EXPORT void __wrap_free(void*)
24 SHIM_ALIAS_SYMBOL(ShimFree);
25
26 SHIM_ALWAYS_EXPORT void* __wrap_malloc(size_t)
27 SHIM_ALIAS_SYMBOL(ShimMalloc);
28
29 SHIM_ALWAYS_EXPORT void* __wrap_memalign(size_t, size_t)
30 SHIM_ALIAS_SYMBOL(ShimMemalign);
31
32 SHIM_ALWAYS_EXPORT int __wrap_posix_memalign(void**, size_t, size_t)
33 SHIM_ALIAS_SYMBOL(ShimPosixMemalign);
34
35 SHIM_ALWAYS_EXPORT void* __wrap_pvalloc(size_t)
36 SHIM_ALIAS_SYMBOL(ShimPvalloc);
37
38 SHIM_ALWAYS_EXPORT void* __wrap_realloc(void*, size_t)
39 SHIM_ALIAS_SYMBOL(ShimRealloc);
40
41 SHIM_ALWAYS_EXPORT void* __wrap_valloc(size_t)
42 SHIM_ALIAS_SYMBOL(ShimValloc);
43
44 } // extern "C"
OLDNEW
« no previous file with comments | « base/allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc ('k') | base/allocator/allocator_shim_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698