Index: third_party/tcmalloc/chromium/src/gperftools/malloc_extension_c.h |
diff --git a/third_party/tcmalloc/chromium/src/google/malloc_extension_c.h b/third_party/tcmalloc/chromium/src/gperftools/malloc_extension_c.h |
similarity index 84% |
copy from third_party/tcmalloc/chromium/src/google/malloc_extension_c.h |
copy to third_party/tcmalloc/chromium/src/gperftools/malloc_extension_c.h |
index fcaa8cd9b92458bd312100684d98c9645cdebb89..72a0a7c173304d60f685137241b88afafd80657b 100644 |
--- a/third_party/tcmalloc/chromium/src/google/malloc_extension_c.h |
+++ b/third_party/tcmalloc/chromium/src/gperftools/malloc_extension_c.h |
@@ -58,9 +58,9 @@ extern "C" { |
#define kMallocExtensionHistogramSize 64 |
PERFTOOLS_DLL_DECL int MallocExtension_VerifyAllMemory(void); |
-PERFTOOLS_DLL_DECL int MallocExtension_VerifyNewMemory(void* p); |
-PERFTOOLS_DLL_DECL int MallocExtension_VerifyArrayNewMemory(void* p); |
-PERFTOOLS_DLL_DECL int MallocExtension_VerifyMallocMemory(void* p); |
+PERFTOOLS_DLL_DECL int MallocExtension_VerifyNewMemory(const void* p); |
+PERFTOOLS_DLL_DECL int MallocExtension_VerifyArrayNewMemory(const void* p); |
+PERFTOOLS_DLL_DECL int MallocExtension_VerifyMallocMemory(const void* p); |
PERFTOOLS_DLL_DECL int MallocExtension_MallocMemoryStats(int* blocks, size_t* total, |
int histogram[kMallocExtensionHistogramSize]); |
PERFTOOLS_DLL_DECL void MallocExtension_GetStats(char* buffer, int buffer_length); |
@@ -78,7 +78,19 @@ PERFTOOLS_DLL_DECL void MallocExtension_MarkThreadBusy(void); |
PERFTOOLS_DLL_DECL void MallocExtension_ReleaseToSystem(size_t num_bytes); |
PERFTOOLS_DLL_DECL void MallocExtension_ReleaseFreeMemory(void); |
PERFTOOLS_DLL_DECL size_t MallocExtension_GetEstimatedAllocatedSize(size_t size); |
-PERFTOOLS_DLL_DECL size_t MallocExtension_GetAllocatedSize(void* p); |
+PERFTOOLS_DLL_DECL size_t MallocExtension_GetAllocatedSize(const void* p); |
+ |
+/* |
+ * NOTE: These enum values MUST be kept in sync with the version in |
+ * malloc_extension.h |
+ */ |
+typedef enum { |
+ MallocExtension_kUnknownOwnership = 0, |
+ MallocExtension_kOwned, |
+ MallocExtension_kNotOwned |
+} MallocExtension_Ownership; |
+ |
+PERFTOOLS_DLL_DECL MallocExtension_Ownership MallocExtension_GetOwnership(const void* p); |
#ifdef __cplusplus |
} // extern "C" |