| OLD | NEW |
| 1 /* Copyright (c) 2003, Google Inc. | 1 /* Copyright (c) 2003, 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 |
| 11 * copyright notice, this list of conditions and the following disclaimer | 11 * copyright notice, this list of conditions and the following disclaimer |
| 12 * in the documentation and/or other materials provided with the | 12 * in the documentation and/or other materials provided with the |
| 13 * distribution. | 13 * distribution. |
| 14 * * Neither the name of Google Inc. nor the names of its | 14 * * Neither the name of Google Inc. nor the names of its |
| 15 * contributors may be used to endorse or promote products derived from | 15 * contributors may be used to endorse or promote products derived from |
| 16 * this software without specific prior written permission. | 16 * this software without specific prior written permission. |
| 17 * | 17 * |
| 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| (...skipping 18 matching lines...) Expand all Loading... |
| 46 #ifndef __THROW /* I guess we're not on a glibc system */ | 46 #ifndef __THROW /* I guess we're not on a glibc system */ |
| 47 # define __THROW /* __THROW is just an optimization, so ok to make it "" */ | 47 # define __THROW /* __THROW is just an optimization, so ok to make it "" */ |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 // Define the version number so folks can check against it | 50 // Define the version number so folks can check against it |
| 51 #define TC_VERSION_MAJOR 2 | 51 #define TC_VERSION_MAJOR 2 |
| 52 #define TC_VERSION_MINOR 0 | 52 #define TC_VERSION_MINOR 0 |
| 53 #define TC_VERSION_PATCH "" | 53 #define TC_VERSION_PATCH "" |
| 54 #define TC_VERSION_STRING "gperftools 2.0" | 54 #define TC_VERSION_STRING "gperftools 2.0" |
| 55 | 55 |
| 56 // When passed to mallopt() as first argument causes it to return |
| 57 // TC_MALLOPT_IS_OVERRIDDEN_BY_TCMALLOC. Used to detect the sanity of the |
| 58 // overriding mechanisms at runtime. |
| 59 #define TC_MALLOPT_IS_OVERRIDDEN_BY_TCMALLOC 0xbeef42 |
| 60 |
| 56 // For struct mallinfo, it it's defined. | 61 // For struct mallinfo, it it's defined. |
| 57 #ifdef HAVE_STRUCT_MALLINFO | 62 #ifdef HAVE_STRUCT_MALLINFO |
| 58 // Malloc can be in several places on older versions of OS X. | 63 // Malloc can be in several places on older versions of OS X. |
| 59 # if defined(HAVE_MALLOC_H) | 64 # if defined(HAVE_MALLOC_H) |
| 60 # include <malloc.h> | 65 # include <malloc.h> |
| 61 # elif defined(HAVE_SYS_MALLOC_H) | 66 # elif defined(HAVE_SYS_MALLOC_H) |
| 62 # include <sys/malloc.h> | 67 # include <sys/malloc.h> |
| 63 # elif defined(HAVE_MALLOC_MALLOC_H) | 68 # elif defined(HAVE_MALLOC_MALLOC_H) |
| 64 # include <malloc/malloc.h> | 69 # include <malloc/malloc.h> |
| 65 # endif | 70 # endif |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 PERFTOOLS_DLL_DECL void* tc_newarray(size_t size); | 129 PERFTOOLS_DLL_DECL void* tc_newarray(size_t size); |
| 125 PERFTOOLS_DLL_DECL void* tc_newarray_nothrow(size_t size, | 130 PERFTOOLS_DLL_DECL void* tc_newarray_nothrow(size_t size, |
| 126 const std::nothrow_t&) __THROW; | 131 const std::nothrow_t&) __THROW; |
| 127 PERFTOOLS_DLL_DECL void tc_deletearray(void* p) __THROW; | 132 PERFTOOLS_DLL_DECL void tc_deletearray(void* p) __THROW; |
| 128 PERFTOOLS_DLL_DECL void tc_deletearray_nothrow(void* p, | 133 PERFTOOLS_DLL_DECL void tc_deletearray_nothrow(void* p, |
| 129 const std::nothrow_t&) __THROW; | 134 const std::nothrow_t&) __THROW; |
| 130 } | 135 } |
| 131 #endif | 136 #endif |
| 132 | 137 |
| 133 #endif // #ifndef TCMALLOC_TCMALLOC_H_ | 138 #endif // #ifndef TCMALLOC_TCMALLOC_H_ |
| OLD | NEW |