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

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

Issue 1076002: Revert 41938 - Merged third_party/tcmalloc/vendor/src(googleperftools r87) in... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
54 #include <sys/types.h> // for size_t 56 #include <sys/types.h> // for size_t
55 // I can't #include config.h in this public API file, but I should 57 #ifdef HAVE_STDINT_H
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
60 #include <stdint.h> // for uintptr_t 58 #include <stdint.h> // for uintptr_t
61 #endif 59 #endif
62 #include <stdarg.h> // for va_list 60 #include <stdarg.h> // for va_list
63 #include <vector> 61 #include <vector>
64 62
65 // Annoying stuff for windows -- makes sure clients can import these functions 63 // Annoying stuff for windows -- makes sure clients can import these functions
66 #ifndef PERFTOOLS_DLL_DECL 64 #ifndef PERFTOOLS_DLL_DECL
67 # ifdef _WIN32 65 # ifdef _WIN32
68 # define PERFTOOLS_DLL_DECL __declspec(dllimport) 66 # define PERFTOOLS_DLL_DECL __declspec(dllimport)
69 # else 67 # else
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 // (they run only if we are doing heap leak checking.) 407 // (they run only if we are doing heap leak checking.)
410 // 'body' should be the cleanup code to run. 'name' doesn't matter, 408 // 'body' should be the cleanup code to run. 'name' doesn't matter,
411 // but must be unique amongst all REGISTER_HEAPCHECK_CLEANUP calls. 409 // but must be unique amongst all REGISTER_HEAPCHECK_CLEANUP calls.
412 #define REGISTER_HEAPCHECK_CLEANUP(name, body) \ 410 #define REGISTER_HEAPCHECK_CLEANUP(name, body) \
413 namespace { \ 411 namespace { \
414 void heapcheck_cleanup_##name() { body; } \ 412 void heapcheck_cleanup_##name() { body; } \
415 static HeapCleaner heapcheck_cleaner_##name(&heapcheck_cleanup_##name); \ 413 static HeapCleaner heapcheck_cleaner_##name(&heapcheck_cleanup_##name); \
416 } 414 }
417 415
418 #endif // BASE_HEAP_CHECKER_H_ 416 #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