summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2013-05-07 22:28:05 +0000
committeralkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2013-05-07 22:28:05 +0000
commit376a3107aa06063d72132318ac5ad266466e4325 (patch)
tree4c2ae570c6a08948f264738e56434bb5ecb38048
parent58d39a1b2190b9d0b719ee33f7bc5383a9b27462 (diff)
downloadgperftools-376a3107aa06063d72132318ac5ad266466e4325.tar.gz
issue-368: allocate enough bytes for large metadata allocations
During issue-368 review it was correctly pointed out then in place where I compare metadata allocation size to threshold I should pass that size down to TCMalloc_SystemAlloc instead of threshold. git-svn-id: http://gperftools.googlecode.com/svn/trunk@217 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
-rw-r--r--src/common.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.cc b/src/common.cc
index cd1e013..9d48377 100644
--- a/src/common.cc
+++ b/src/common.cc
@@ -225,7 +225,7 @@ static SpinLock metadata_alloc_lock(SpinLock::LINKER_INITIALIZED);
void* MetaDataAlloc(size_t bytes) {
if (bytes >= kMetadataAllocChunkSize) {
- void *rv = TCMalloc_SystemAlloc(kMetadataBigAllocThreshold,
+ void *rv = TCMalloc_SystemAlloc(bytes,
NULL, kMetadataAllignment);
if (rv != NULL) {
metadata_system_bytes_ += bytes;