aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/speedymalloc.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-03-09 19:34:31 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-03-09 19:34:31 +0100
commit3884a7712b74c09d4216b856464d6c3cdd9e3476 (patch)
tree1ccef133671bc885a46ea54edc39f983fc4ef298 /src/allocators/speedymalloc.py
parent8b416335805fc07262c0570bda324afccb5e3da3 (diff)
downloadallocbench-3884a7712b74c09d4216b856464d6c3cdd9e3476.tar.gz
allocbench-3884a7712b74c09d4216b856464d6c3cdd9e3476.zip
fmt all src/allocators using yapf
Diffstat (limited to 'src/allocators/speedymalloc.py')
-rw-r--r--src/allocators/speedymalloc.py35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/allocators/speedymalloc.py b/src/allocators/speedymalloc.py
index 48b19cb..6e37b6c 100644
--- a/src/allocators/speedymalloc.py
+++ b/src/allocators/speedymalloc.py
@@ -14,7 +14,6 @@
#
# You should have received a copy of the GNU General Public License
# along with allocbench. If not, see <http://www.gnu.org/licenses/>.
-
"""Bumpptr allocator
The bumpptr allocator makes the biggest possible tradeoff between speed and
@@ -27,10 +26,12 @@ from src.allocator import Allocator
VERSION = "7b73dc51bba043d6b3269dd497263f03d52fc1ca"
+
class Speedymalloc(Allocator):
""" Speedymalloc definition for allocbench"""
- sources = GitArtifact("speedymalloc", "https://gitlab.cs.fau.de/flow/speedymalloc.git")
+ sources = GitArtifact("speedymalloc",
+ "https://gitlab.cs.fau.de/flow/speedymalloc.git")
def __init__(self, name, **kwargs):
@@ -38,27 +39,33 @@ class Speedymalloc(Allocator):
for option, value in kwargs.get("options", {}).items():
configuration += f"-D{option}={value} "
- self.build_cmds = [f"meson {{srcdir}} {{dir}} {configuration}",
- "ninja -C {dir}"]
+ self.build_cmds = [
+ f"meson {{srcdir}} {{dir}} {configuration}", "ninja -C {dir}"
+ ]
self.LD_PRELOAD = "{dir}/libspeedymalloc.so"
super().__init__(name, **kwargs)
+
speedymalloc = Speedymalloc("speedymalloc", version=VERSION)
speedymalloc_dont_madv_free = Speedymalloc("speedymalloc_dont_madv_free",
- options = {"madvise_free": "false"},
- version=VERSION)
+ options={"madvise_free": "false"},
+ version=VERSION)
-speedymalloc_dont_madv_willneed = Speedymalloc("speedymalloc_dont_madv_willneed",
- options = {"madvise_willneed": "false"},
- version=VERSION)
+speedymalloc_dont_madv_willneed = Speedymalloc(
+ "speedymalloc_dont_madv_willneed",
+ options={"madvise_willneed": "false"},
+ version=VERSION)
speedymalloc_4095_sc_32 = Speedymalloc("speedymalloc_dont_madv_willneed",
- options = {"cache_bins": 4095,
- "cache_bin_seperation": 32},
+ options={
+ "cache_bins": 4095,
+ "cache_bin_seperation": 32
+ },
version=VERSION)
-speedymalloc_no_glab = Speedymalloc("speedymalloc_dont_madv_willneed",
- options = {"max_local_allocation_buffer_size": 0},
- version=VERSION)
+speedymalloc_no_glab = Speedymalloc(
+ "speedymalloc_dont_madv_willneed",
+ options={"max_local_allocation_buffer_size": 0},
+ version=VERSION)