diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-17 14:54:26 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-17 14:54:26 +0200 |
| commit | 0d192f8cf3c21b2382e227fab057dabe16ea5e8b (patch) | |
| tree | d1182f33bd69e72fdde0a4731287f28c318ef109 /src/allocators/tcmalloc/tcmalloc_2.7_no_active_falsesharing.patch | |
| parent | 3988f2e21754208a548725c590fb42e372a32efa (diff) | |
| download | allocbench-0d192f8cf3c21b2382e227fab057dabe16ea5e8b.tar.gz allocbench-0d192f8cf3c21b2382e227fab057dabe16ea5e8b.zip | |
reduce code duplication by giving each known allocator its own class
also move allocator related code to src/allocators
Diffstat (limited to 'src/allocators/tcmalloc/tcmalloc_2.7_no_active_falsesharing.patch')
| -rw-r--r-- | src/allocators/tcmalloc/tcmalloc_2.7_no_active_falsesharing.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/allocators/tcmalloc/tcmalloc_2.7_no_active_falsesharing.patch b/src/allocators/tcmalloc/tcmalloc_2.7_no_active_falsesharing.patch new file mode 100644 index 0000000..c14172d --- /dev/null +++ b/src/allocators/tcmalloc/tcmalloc_2.7_no_active_falsesharing.patch @@ -0,0 +1,17 @@ +diff --git a/src/thread_cache.cc b/src/thread_cache.cc +index 6d2f832..2074f4a 100644 +--- a/src/thread_cache.cc ++++ b/src/thread_cache.cc +@@ -120,7 +120,11 @@ void* ThreadCache::FetchFromCentralCache(uint32 cl, int32_t byte_size, + ASSERT(list->empty()); + const int batch_size = Static::sizemap()->num_objects_to_move(cl); + +- const int num_to_move = min<int>(list->max_length(), batch_size); ++ int num_to_move = min<int>(list->max_length(), batch_size); ++ const int cache_line_parts = 64 / byte_size; ++ if (cache_line_parts > 0 && cache_line_parts > num_to_move) ++ num_to_move = cache_line_parts; ++ + void *start, *end; + int fetch_count = Static::central_cache()[cl].RemoveRange( + &start, &end, num_to_move); |
