summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc/tcmalloc.gyp
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-19 05:16:55 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-19 05:16:55 +0000
commit31814a80483a091ec3730c8a09b3b74d4f87fd1c (patch)
tree42d1a4b4485db9d4fea3a52bd42bbf4f53deb1cb /third_party/tcmalloc/tcmalloc.gyp
parent61f51862413cdae16a58ebc5435f6ba94f633b58 (diff)
downloadchromium_src-31814a80483a091ec3730c8a09b3b74d4f87fd1c.zip
chromium_src-31814a80483a091ec3730c8a09b3b74d4f87fd1c.tar.gz
chromium_src-31814a80483a091ec3730c8a09b3b74d4f87fd1c.tar.bz2
tcmalloc tests & bug fixes:
bugfixes: 1) calling the new handler would return true when exceptions were disabled. In Chrome's case, this didn't matter, because we use a handler which forces a crash. However, if you use a different handler that doesn't crash, this causes a loop - forever calling the new handler. Return false instead as there is no other way to break the loop. 2) recalloc() was broken. It was zeroing the buffer on recalloc calls, which is incorrect. testing: I took a set of tests from tcmalloc and applied them into a new unittest. The new unittest can test all allocators used by the allocator-shim. I included the atomic tests in here, simply because it was easy to do, and it seemed it could prove useful for cross platform testing. Overall, I'd say these are a sanity test, and not a comprehensive test. BUG=none TEST=tcmalloc_unittests.cc Review URL: http://codereview.chromium.org/213030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/tcmalloc/tcmalloc.gyp')
-rw-r--r--third_party/tcmalloc/tcmalloc.gyp19
1 files changed, 19 insertions, 0 deletions
diff --git a/third_party/tcmalloc/tcmalloc.gyp b/third_party/tcmalloc/tcmalloc.gyp
index 8a11bf6..6649956 100644
--- a/third_party/tcmalloc/tcmalloc.gyp
+++ b/third_party/tcmalloc/tcmalloc.gyp
@@ -246,6 +246,25 @@
}],
],
},
+ {
+ 'target_name': 'tcmalloc_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ 'tcmalloc',
+ '../../testing/gtest.gyp:gtest',
+ ],
+ 'include_dirs': [
+ '.',
+ 'tcmalloc/src/base',
+ 'tcmalloc/src',
+ '../..',
+ ],
+ 'msvs_guid': 'E99DA267-BE90-4F45-1294-6919DB2C9999',
+ 'sources': [
+ 'unittest_utils.cc',
+ 'tcmalloc_unittests.cc',
+ ],
+ },
],
'conditions': [
['OS=="win"', {