From 376a3107aa06063d72132318ac5ad266466e4325 Mon Sep 17 00:00:00 2001 From: "alkondratenko@gmail.com" Date: Tue, 7 May 2013 22:28:05 +0000 Subject: 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 --- src/common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1