diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-27 14:56:54 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-27 14:56:54 +0200 |
| commit | 589f45bd6e4058658ed0c86b7387802ee0be37d8 (patch) | |
| tree | 3498da771f9b3dadd66333bb96a0958916256e81 | |
| parent | 5de25aaac2358494469605ace1685307d294bdbf (diff) | |
| download | allocbench-589f45bd6e4058658ed0c86b7387802ee0be37d8.tar.gz allocbench-589f45bd6e4058658ed0c86b7387802ee0be37d8.zip | |
add mimalloc definition
| -rw-r--r-- | src/allocators/all.py | 4 | ||||
| -rw-r--r-- | src/allocators/mimalloc.py | 24 |
2 files changed, 27 insertions, 1 deletions
diff --git a/src/allocators/all.py b/src/allocators/all.py index 9afacf7..d39c165 100644 --- a/src/allocators/all.py +++ b/src/allocators/all.py @@ -10,7 +10,9 @@ from src.allocators.scalloc import scalloc from src.allocators.supermalloc import supermalloc from src.allocators.llalloc import llalloc from src.allocators.tbbmalloc import tbbmalloc +from src.allocators.mimalloc import mimalloc allocators = [*src.allocators.glibcs.allocators, tcmalloc, tcmalloc_nofs, - jemalloc, hoard, mesh, supermalloc, scalloc, llalloc, tbbmalloc] + jemalloc, hoard, mesh, supermalloc, scalloc, llalloc, tbbmalloc, + mimalloc] diff --git a/src/allocators/mimalloc.py b/src/allocators/mimalloc.py new file mode 100644 index 0000000..b636a04 --- /dev/null +++ b/src/allocators/mimalloc.py @@ -0,0 +1,24 @@ +import src.allocator + +version = "master" + +mimalloc_src = src.allocator.Allocator_Sources("mimalloc", + ["git clone https://github.com/microsoft/mimalloc"], + ["git checkout ".format(version)], + ["git stash"]) + + +class Mimalloc (src.allocator.Allocator): + """mimalloc definition for allocbench""" + def __init__(self, name, **kwargs): + + kwargs["sources"] = mimalloc_src + kwargs["LD_PRELOAD"] = "{dir}/libmimalloc.so" + kwargs["build_cmds"] = ["cd {srcdir}; mkdir -p {dir}", + "cd {dir}; cmake {srcdir}", + "cd {dir}; make"] + + super().__init__(name, **kwargs) + + +mimalloc = Mimalloc("mimalloc") |
