summaryrefslogtreecommitdiff
path: root/src/central_freelist.h
diff options
context:
space:
mode:
authorcsilvers <csilvers@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2011-03-21 21:41:55 +0000
committercsilvers <csilvers@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2011-03-21 21:41:55 +0000
commit1d30e525ae6ac38ae381bb3118f7f47998af2942 (patch)
treea8349a4801e90c96515f3c0329a5a6c1813fc27f /src/central_freelist.h
parent6fe07cd2c0527e18276cc79a57e2212a4b048746 (diff)
downloadgperftools-1d30e525ae6ac38ae381bb3118f7f47998af2942.tar.gz
* Improve debugallocation tc_malloc_size (csilvers)
* Extend atomicops.h to use ARM V6+ optimized code (sanek) * Fix failure in Ranges test (ppluzhnikov) * Change malloc-hook to use a list-like structure (llib) * Update tcmalloc_regtest to use new malloc hooks (llib) * PARTIAL: Keep track of 'overhead' bytes in the page cache (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@108 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
Diffstat (limited to 'src/central_freelist.h')
-rw-r--r--src/central_freelist.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/central_freelist.h b/src/central_freelist.h
index 2e6a31b..a520f68 100644
--- a/src/central_freelist.h
+++ b/src/central_freelist.h
@@ -64,6 +64,12 @@ class CentralFreeList {
// Returns the number of free objects in the transfer cache.
int tc_length();
+ // Returns the memory overhead (internal fragmentation) attributable
+ // to the freelist. This is memory lost when the size of elements
+ // in a freelist doesn't exactly divide the page-size (a 8192-byte
+ // page full of 5-byte objects would have 2 bytes memory overhead).
+ size_t OverheadBytes();
+
private:
// TransferCache is used to cache transfers of
// sizemap.num_objects_to_move(size_class) back and forth between