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

Side by Side Diff: third_party/tcmalloc/chromium/src/google/heap-checker.h

Issue 576001: Merged third_party/tcmalloc/vendor/src(google-perftools r87) into... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed the unnecessary printf and ASSERT(0) Created 10 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) 2005, Google Inc. 1 // Copyright (c) 2005, 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // _type_ is usually "normal" but can also be "minimal", "strict", or 44 // _type_ is usually "normal" but can also be "minimal", "strict", or
45 // "draconian". (See the html file for other options, like 'local'.) 45 // "draconian". (See the html file for other options, like 'local'.)
46 // 46 //
47 // After that, just run your binary. If the heap-checker detects 47 // After that, just run your binary. If the heap-checker detects
48 // a memory leak at program-exit, it will print instructions on how 48 // a memory leak at program-exit, it will print instructions on how
49 // to track down the leak. 49 // to track down the leak.
50 50
51 #ifndef BASE_HEAP_CHECKER_H_ 51 #ifndef BASE_HEAP_CHECKER_H_
52 #define BASE_HEAP_CHECKER_H_ 52 #define BASE_HEAP_CHECKER_H_
53 53
54 #include "config.h"
55
56 #include <sys/types.h> // for size_t 54 #include <sys/types.h> // for size_t
57 #ifdef HAVE_STDINT_H 55 // I can't #include config.h in this public API file, but I should
56 // really use configure (and make malloc_extension.h a .in file) to
57 // figure out if the system has stdint.h or not. But I'm lazy, so
58 // for now I'm assuming it's a problem only with MSVC.
59 #ifndef _MSC_VER
58 #include <stdint.h> // for uintptr_t 60 #include <stdint.h> // for uintptr_t
59 #endif 61 #endif
60 #include <stdarg.h> // for va_list 62 #include <stdarg.h> // for va_list
61 #include <vector> 63 #include <vector>
62 64
63 // Annoying stuff for windows -- makes sure clients can import these functions 65 // Annoying stuff for windows -- makes sure clients can import these functions
64 #ifndef PERFTOOLS_DLL_DECL 66 #ifndef PERFTOOLS_DLL_DECL
65 # ifdef _WIN32 67 # ifdef _WIN32
66 # define PERFTOOLS_DLL_DECL __declspec(dllimport) 68 # define PERFTOOLS_DLL_DECL __declspec(dllimport)
67 # else 69 # else
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 // (they run only if we are doing heap leak checking.) 409 // (they run only if we are doing heap leak checking.)
408 // 'body' should be the cleanup code to run. 'name' doesn't matter, 410 // 'body' should be the cleanup code to run. 'name' doesn't matter,
409 // but must be unique amongst all REGISTER_HEAPCHECK_CLEANUP calls. 411 // but must be unique amongst all REGISTER_HEAPCHECK_CLEANUP calls.
410 #define REGISTER_HEAPCHECK_CLEANUP(name, body) \ 412 #define REGISTER_HEAPCHECK_CLEANUP(name, body) \
411 namespace { \ 413 namespace { \
412 void heapcheck_cleanup_##name() { body; } \ 414 void heapcheck_cleanup_##name() { body; } \
413 static HeapCleaner heapcheck_cleaner_##name(&heapcheck_cleanup_##name); \ 415 static HeapCleaner heapcheck_cleaner_##name(&heapcheck_cleanup_##name); \
414 } 416 }
415 417
416 #endif // BASE_HEAP_CHECKER_H_ 418 #endif // BASE_HEAP_CHECKER_H_
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/debugallocation.cc ('k') | third_party/tcmalloc/chromium/src/google/malloc_extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698