| Index: third_party/tcmalloc/chromium/src/tcmalloc.cc
|
| diff --git a/third_party/tcmalloc/chromium/src/tcmalloc.cc b/third_party/tcmalloc/chromium/src/tcmalloc.cc
|
| index 4709411718bc9eba3e96af3d4b4cc6ac1233284b..3077b75972645cf82958edacb65180bbea1db384 100644
|
| --- a/third_party/tcmalloc/chromium/src/tcmalloc.cc
|
| +++ b/third_party/tcmalloc/chromium/src/tcmalloc.cc
|
| @@ -1390,7 +1390,13 @@ inline void do_malloc_stats() {
|
| }
|
|
|
| inline int do_mallopt(int cmd, int value) {
|
| - return 1; // Indicates error
|
| + if (cmd == TC_MALLOPT_IS_OVERRIDDEN_BY_TCMALLOC)
|
| + return TC_MALLOPT_IS_OVERRIDDEN_BY_TCMALLOC;
|
| +
|
| + // 1 is the success return value according to man mallopt(). However (see the
|
| + // BUGS section in the manpage), most implementations return always 1.
|
| + // This code is just complying with that (buggy) expectation.
|
| + return 1;
|
| }
|
|
|
| #ifdef HAVE_STRUCT_MALLINFO
|
|
|