Chromium Code Reviews| Index: third_party/tcmalloc/chromium/src/libc_override.h |
| diff --git a/third_party/tcmalloc/chromium/src/libc_override.h b/third_party/tcmalloc/chromium/src/libc_override.h |
| index 089084a2e4988d34fd0723f4d651f194e264a2c4..de18abb8db33378b576d5583c4cfe069b061d608 100644 |
| --- a/third_party/tcmalloc/chromium/src/libc_override.h |
| +++ b/third_party/tcmalloc/chromium/src/libc_override.h |
| @@ -59,12 +59,16 @@ |
| static void ReplaceSystemAlloc(); // defined in the .h files below |
| +#if defined(TCMALLOC_DONT_REPLACE_SYSTEM_ALLOC) |
| + |
| +static void ReplaceSystemAlloc() {} |
|
Will Harris
2016/02/08 19:23:55
add some comment here. it's a bit subtle what this
Primiano Tucci (use gerrit)
2016/02/09 11:38:53
Done.
|
| + |
| // For windows, there are two ways to get tcmalloc. If we're |
| // patching, then src/windows/patch_function.cc will do the necessary |
| // overriding here. Otherwise, we doing the 'redefine' trick, where |
| // we remove malloc/new/etc from mscvcrt.dll, and just need to define |
| // them now. |
| -#if defined(_WIN32) && defined(WIN32_DO_PATCHING) |
| +#elif defined(_WIN32) && defined(WIN32_DO_PATCHING) |
| void PatchWindowsFunctions(); // in src/windows/patch_function.cc |
| static void ReplaceSystemAlloc() { PatchWindowsFunctions(); } |