aboutsummaryrefslogtreecommitdiff
path: root/allocators/glibc_2.28_no_passive_falsesharing.patch
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-02-09 12:45:38 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-02-09 12:45:38 +0100
commit4c0830ffbc045290c167e482855cb25a639df0e0 (patch)
treee66c2e0cbb209e5ab4442dfd7897cec23c8c5ff3 /allocators/glibc_2.28_no_passive_falsesharing.patch
parentcd9264be5594a7715dde29b3c0be82a00baf5fd1 (diff)
downloadallocbench-4c0830ffbc045290c167e482855cb25a639df0e0.tar.gz
allocbench-4c0830ffbc045290c167e482855cb25a639df0e0.zip
add allocators build support and two allocator definitions
The allocators created by the file allocators/BA_allocators.py are those used in my BA thesis available at: https://muhq.space/ba.html. allocators/no_falsesharing.py builds patched versions of tcmalloc and glibc without any allocator inroduced falsesharing.
Diffstat (limited to 'allocators/glibc_2.28_no_passive_falsesharing.patch')
-rw-r--r--allocators/glibc_2.28_no_passive_falsesharing.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/allocators/glibc_2.28_no_passive_falsesharing.patch b/allocators/glibc_2.28_no_passive_falsesharing.patch
new file mode 100644
index 0000000..fcc695c
--- /dev/null
+++ b/allocators/glibc_2.28_no_passive_falsesharing.patch
@@ -0,0 +1,22 @@
+diff --git a/malloc/malloc.c b/malloc/malloc.c
+index 27cf6137c2..3aadaddd1d 100644
+--- a/malloc/malloc.c
++++ b/malloc/malloc.c
+@@ -4172,6 +4172,9 @@ _int_free (mstate av, mchunkptr p, int have_lock)
+
+ #if USE_TCACHE
+ {
++ /* Check if chunk is from our own arena. */
++ if (av == thread_arena)
++ {
+ size_t tc_idx = csize2tidx (size);
+ if (tcache != NULL && tc_idx < mp_.tcache_bins)
+ {
+@@ -4201,6 +4204,7 @@ _int_free (mstate av, mchunkptr p, int have_lock)
+ return;
+ }
+ }
++ }
+ }
+ #endif
+