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

Side by Side Diff: third_party/tcmalloc/vendor/src/libc_override.h

Issue 9702045: Update the tcmalloc vendor branch to r144 (gperftools 2.0), and README.chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, Google Inc. 1 // Copyright (c) 2011, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // matters too, so we have a different file for each libc, and often 48 // matters too, so we have a different file for each libc, and often
49 // for different compilers and OS's. 49 // for different compilers and OS's.
50 50
51 #ifndef TCMALLOC_LIBC_OVERRIDE_INL_H_ 51 #ifndef TCMALLOC_LIBC_OVERRIDE_INL_H_
52 #define TCMALLOC_LIBC_OVERRIDE_INL_H_ 52 #define TCMALLOC_LIBC_OVERRIDE_INL_H_
53 53
54 #include <config.h> 54 #include <config.h>
55 #ifdef HAVE_FEATURES_H 55 #ifdef HAVE_FEATURES_H
56 #include <features.h> // for __GLIBC__ 56 #include <features.h> // for __GLIBC__
57 #endif 57 #endif
58 #include <google/tcmalloc.h> 58 #include <gperftools/tcmalloc.h>
59 59
60 static void ReplaceSystemAlloc(); // defined in the .h files below 60 static void ReplaceSystemAlloc(); // defined in the .h files below
61 61
62 // For windows, there are two ways to get tcmalloc. If we're 62 // For windows, there are two ways to get tcmalloc. If we're
63 // patching, then src/windows/patch_function.cc will do the necessary 63 // patching, then src/windows/patch_function.cc will do the necessary
64 // overriding here. Otherwise, we doing the 'redefine' trick, where 64 // overriding here. Otherwise, we doing the 'redefine' trick, where
65 // we remove malloc/new/etc from mscvcrt.dll, and just need to define 65 // we remove malloc/new/etc from mscvcrt.dll, and just need to define
66 // them now. 66 // them now.
67 #if defined(_WIN32) && defined(WIN32_DO_PATCHING) 67 #if defined(_WIN32) && defined(WIN32_DO_PATCHING)
68 void PatchWindowsFunctions(); // in src/windows/patch_function.cc 68 void PatchWindowsFunctions(); // in src/windows/patch_function.cc
(...skipping 12 matching lines...) Expand all
81 // ones I know of do, so for now just assume they all do. 81 // ones I know of do, so for now just assume they all do.
82 #elif defined(__GNUC__) 82 #elif defined(__GNUC__)
83 #include "libc_override_gcc_and_weak.h" 83 #include "libc_override_gcc_and_weak.h"
84 84
85 #else 85 #else
86 #error Need to add support for your libc/OS here 86 #error Need to add support for your libc/OS here
87 87
88 #endif 88 #endif
89 89
90 #endif // TCMALLOC_LIBC_OVERRIDE_INL_H_ 90 #endif // TCMALLOC_LIBC_OVERRIDE_INL_H_
OLDNEW
« no previous file with comments | « third_party/tcmalloc/vendor/src/internal_logging.cc ('k') | third_party/tcmalloc/vendor/src/libc_override_gcc_and_weak.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698