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

Unified Diff: base/allocator/allocator_shim_override_linker_wrapped_symbols.h

Issue 2720703004: allocator: Fix function type mismatch in allocator function definitions. (Closed)
Patch Set: Change shim functions to be ALWAYS_INLINE and replace all aliases with calls Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/allocator/allocator_shim_override_libc_symbols.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_shim_override_linker_wrapped_symbols.h
diff --git a/base/allocator/allocator_shim_override_linker_wrapped_symbols.h b/base/allocator/allocator_shim_override_linker_wrapped_symbols.h
index 5b85d6ee2fe0fed700bcbf98ed4d1227e3d975bd..6bf73c39f2df94576f4614d1fecd0637e63e746e 100644
--- a/base/allocator/allocator_shim_override_linker_wrapped_symbols.h
+++ b/base/allocator/allocator_shim_override_linker_wrapped_symbols.h
@@ -17,28 +17,38 @@
extern "C" {
-SHIM_ALWAYS_EXPORT void* __wrap_calloc(size_t, size_t)
- SHIM_ALIAS_SYMBOL(ShimCalloc);
-
-SHIM_ALWAYS_EXPORT void __wrap_free(void*)
- SHIM_ALIAS_SYMBOL(ShimFree);
-
-SHIM_ALWAYS_EXPORT void* __wrap_malloc(size_t)
- SHIM_ALIAS_SYMBOL(ShimMalloc);
-
-SHIM_ALWAYS_EXPORT void* __wrap_memalign(size_t, size_t)
- SHIM_ALIAS_SYMBOL(ShimMemalign);
-
-SHIM_ALWAYS_EXPORT int __wrap_posix_memalign(void**, size_t, size_t)
- SHIM_ALIAS_SYMBOL(ShimPosixMemalign);
-
-SHIM_ALWAYS_EXPORT void* __wrap_pvalloc(size_t)
- SHIM_ALIAS_SYMBOL(ShimPvalloc);
-
-SHIM_ALWAYS_EXPORT void* __wrap_realloc(void*, size_t)
- SHIM_ALIAS_SYMBOL(ShimRealloc);
-
-SHIM_ALWAYS_EXPORT void* __wrap_valloc(size_t)
- SHIM_ALIAS_SYMBOL(ShimValloc);
+SHIM_ALWAYS_EXPORT void* __wrap_calloc(size_t n, size_t size) {
+ return ShimCalloc(n, size, nullptr);
+}
+
+SHIM_ALWAYS_EXPORT void __wrap_free(void* ptr) {
+ ShimFree(ptr, nullptr);
+}
+
+SHIM_ALWAYS_EXPORT void* __wrap_malloc(size_t size) {
+ return ShimMalloc(size, nullptr);
+}
+
+SHIM_ALWAYS_EXPORT void* __wrap_memalign(size_t align, size_t size) {
+ return ShimMemalign(align, size, nullptr);
+}
+
+SHIM_ALWAYS_EXPORT int __wrap_posix_memalign(void** res,
+ size_t align,
+ size_t size) {
+ return ShimPosixMemalign(res, align, size);
+}
+
+SHIM_ALWAYS_EXPORT void* __wrap_pvalloc(size_t size) {
+ return ShimPvalloc(size);
+}
+
+SHIM_ALWAYS_EXPORT void* __wrap_realloc(void* address, size_t size) {
+ return ShimRealloc(address, size, nullptr);
+}
+
+SHIM_ALWAYS_EXPORT void* __wrap_valloc(size_t size) {
+ return ShimValloc(size, nullptr);
+}
} // extern "C"
« no previous file with comments | « base/allocator/allocator_shim_override_libc_symbols.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698