├── .gitattributes ├── .gitmodules ├── LICENSE ├── README.md ├── SConscript ├── TODO ├── data ├── genfigs.R ├── larson │ ├── larson_je.csv │ ├── larson_lr.csv │ ├── larson_mak.csv │ ├── larson_pmdk.csv │ └── larson_r.csv ├── larson_linchart.pdf ├── mm-uncached │ ├── genfigs.R │ ├── larson │ │ ├── larson_je.csv │ │ ├── larson_lr.csv │ │ ├── larson_mak.csv │ │ └── larson_r.csv │ ├── larson_linchart.pdf │ ├── prod-con │ │ ├── prod-con_je.csv │ │ ├── prod-con_lr.csv │ │ ├── prod-con_mak.csv │ │ └── prod-con_r.csv │ ├── prod-con_linchart.pdf │ ├── shbench │ │ ├── shbench_je.csv │ │ ├── shbench_lr.csv │ │ ├── shbench_mak.csv │ │ └── shbench_r.csv │ ├── shbench_linchart.pdf │ ├── threadtest │ │ ├── threadtest_je.csv │ │ ├── threadtest_lr.csv │ │ ├── threadtest_mak.csv │ │ └── threadtest_r.csv │ └── threadtest_linchart.pdf ├── prod-con │ ├── prod-con_je.csv │ ├── prod-con_lr.csv │ ├── prod-con_mak.csv │ ├── prod-con_pmdk.csv │ └── prod-con_r.csv ├── prod-con_linchart.pdf ├── shbench │ ├── shbench_je.csv │ ├── shbench_lr.csv │ ├── shbench_mak.csv │ ├── shbench_pmdk.csv │ └── shbench_r.csv ├── shbench_linchart.pdf ├── threadtest │ ├── threadtest_je.csv │ ├── threadtest_lr.csv │ ├── threadtest_mak.csv │ ├── threadtest_pmdk.csv │ └── threadtest_r.csv ├── threadtest_linchart.pdf ├── uncached+dax │ ├── genfigs.R │ ├── larson │ │ ├── larson_je.csv │ │ ├── larson_lr.csv │ │ ├── larson_mak.csv │ │ ├── larson_pmdk.csv │ │ └── larson_r.csv │ ├── larson_linchart.pdf │ ├── prod-con │ │ ├── prod-con_je.csv │ │ ├── prod-con_lr.csv │ │ ├── prod-con_mak.csv │ │ ├── prod-con_pmdk.csv │ │ └── prod-con_r.csv │ ├── prod-con_linchart.pdf │ ├── shbench │ │ ├── shbench_je.csv │ │ ├── shbench_lr.csv │ │ ├── shbench_mak.csv │ │ ├── shbench_pmdk.csv │ │ └── shbench_r.csv │ ├── shbench_linchart.pdf │ ├── threadtest │ │ ├── threadtest_je.csv │ │ ├── threadtest_lr.csv │ │ ├── threadtest_mak.csv │ │ ├── threadtest_pmdk.csv │ │ └── threadtest_r.csv │ └── threadtest_linchart.pdf ├── ycsbc_a.csv ├── ycsbc_b.csv ├── ycsbca_linchart.pdf └── ycsbcb_linchart.pdf ├── ext ├── lrmalloc │ ├── .gitignore │ ├── COPYING │ ├── Makefile │ ├── README.md │ ├── defines.h │ ├── log.h │ ├── lrmalloc.cpp │ ├── lrmalloc.h │ ├── pagemap.cpp │ ├── pagemap.h │ ├── pages.cpp │ ├── pages.h │ ├── size_classes.cpp │ ├── size_classes.h │ ├── tcache.cpp │ ├── tcache.h │ └── thread_hooks.cpp └── makalu_alloc │ ├── .depend │ ├── Makefile │ ├── README.md │ ├── examples │ ├── README.md │ └── fill-heap │ │ ├── compile.sh │ │ ├── fill-recover.c │ │ ├── fill-restart.c │ │ └── fill-start.c │ ├── include │ └── makalu.h │ ├── lib │ └── libmakalu.a │ ├── libatomic │ ├── include │ │ ├── atomic_ops.h │ │ ├── atomic_ops │ │ │ ├── ao_version.h │ │ │ ├── generalize-arithm.h │ │ │ ├── generalize-small.h │ │ │ ├── generalize.h │ │ │ └── sysdeps │ │ │ │ ├── all_acquire_release_volatile.h │ │ │ │ ├── all_aligned_atomic_load_store.h │ │ │ │ ├── all_atomic_load_store.h │ │ │ │ ├── all_atomic_only_load.h │ │ │ │ ├── ao_t_is_int.h │ │ │ │ ├── armcc │ │ │ │ └── arm_v6.h │ │ │ │ ├── emul_cas.h │ │ │ │ ├── gcc │ │ │ │ ├── aarch64.h │ │ │ │ ├── alpha.h │ │ │ │ ├── arm.h │ │ │ │ ├── avr32.h │ │ │ │ ├── cris.h │ │ │ │ ├── generic-arithm.h │ │ │ │ ├── generic-small.h │ │ │ │ ├── generic.h │ │ │ │ ├── hexagon.h │ │ │ │ ├── hppa.h │ │ │ │ ├── ia64.h │ │ │ │ ├── m68k.h │ │ │ │ ├── mips.h │ │ │ │ ├── powerpc.h │ │ │ │ ├── riscv.h │ │ │ │ ├── s390.h │ │ │ │ ├── sh.h │ │ │ │ ├── sparc.h │ │ │ │ ├── tile.h │ │ │ │ └── x86.h │ │ │ │ ├── generic_pthread.h │ │ │ │ ├── hpc │ │ │ │ ├── hppa.h │ │ │ │ └── ia64.h │ │ │ │ ├── ibmc │ │ │ │ └── powerpc.h │ │ │ │ ├── icc │ │ │ │ └── ia64.h │ │ │ │ ├── loadstore │ │ │ │ ├── acquire_release_volatile.h │ │ │ │ ├── atomic_load.h │ │ │ │ ├── atomic_store.h │ │ │ │ ├── char_acquire_release_volatile.h │ │ │ │ ├── char_atomic_load.h │ │ │ │ ├── char_atomic_store.h │ │ │ │ ├── double_atomic_load_store.h │ │ │ │ ├── int_acquire_release_volatile.h │ │ │ │ ├── int_atomic_load.h │ │ │ │ ├── int_atomic_store.h │ │ │ │ ├── ordered_loads_only.h │ │ │ │ ├── ordered_stores_only.h │ │ │ │ ├── short_acquire_release_volatile.h │ │ │ │ ├── short_atomic_load.h │ │ │ │ └── short_atomic_store.h │ │ │ │ ├── msftc │ │ │ │ ├── arm.h │ │ │ │ ├── common32_defs.h │ │ │ │ ├── x86.h │ │ │ │ └── x86_64.h │ │ │ │ ├── ordered.h │ │ │ │ ├── ordered_except_wr.h │ │ │ │ ├── read_ordered.h │ │ │ │ ├── standard_ao_double_t.h │ │ │ │ ├── sunc │ │ │ │ ├── sparc.h │ │ │ │ └── x86.h │ │ │ │ ├── test_and_set_t_is_ao_t.h │ │ │ │ └── test_and_set_t_is_char.h │ │ ├── atomic_ops_malloc.h │ │ └── atomic_ops_stack.h │ ├── lib │ │ ├── libatomic_ops.a │ │ ├── libatomic_ops.la │ │ ├── libatomic_ops_gpl.a │ │ ├── libatomic_ops_gpl.la │ │ └── pkgconfig │ │ │ └── atomic_ops.pc │ └── share │ │ └── doc │ │ └── libatomic_ops │ │ ├── COPYING │ │ ├── LICENSING.txt │ │ ├── README.md │ │ ├── README_details.txt │ │ ├── README_malloc.txt │ │ ├── README_stack.txt │ │ └── README_win32.txt │ ├── region_manager │ ├── region_manager.c │ └── region_manager.h │ ├── src │ ├── internal_include │ │ ├── makalu_base_md.h │ │ ├── makalu_block.h │ │ ├── makalu_config.h │ │ ├── makalu_hdr.h │ │ ├── makalu_init.h │ │ ├── makalu_internal.h │ │ ├── makalu_local_heap.h │ │ ├── makalu_malloc.h │ │ ├── makalu_mark.h │ │ ├── makalu_persistent.h │ │ ├── makalu_reclaim.h │ │ ├── makalu_thread.h │ │ ├── makalu_transient.h │ │ ├── makalu_util.h │ │ └── pfence_util.h │ ├── makalu_base_md.c │ ├── makalu_base_md.o │ ├── makalu_block.c │ ├── makalu_block.o │ ├── makalu_hdr.c │ ├── makalu_hdr.o │ ├── makalu_init.c │ ├── makalu_init.o │ ├── makalu_local_heap.c │ ├── makalu_local_heap.o │ ├── makalu_malloc.c │ ├── makalu_malloc.o │ ├── makalu_mark.c │ ├── makalu_mark.o │ ├── makalu_persistent.c │ ├── makalu_persistent.o │ ├── makalu_reclaim.c │ ├── makalu_reclaim.o │ ├── makalu_thread.c │ ├── makalu_thread.o │ ├── makalu_transient.c │ ├── makalu_transient.o │ ├── makalu_util.c │ ├── makalu_util.o │ └── test.c │ └── test │ ├── Makefile │ ├── test │ └── threadtest.c ├── obj └── .gitignore ├── old ├── ArrayQueue.hpp ├── ArrayStack.hpp ├── HazardPointers.hpp ├── LICENSE ├── LockfreeStack.hpp ├── Makefile ├── MichaelScottQueue.hpp ├── PageMap.cpp ├── PageMap.hpp ├── README.md ├── README.old ├── concurrentprimitives.hpp ├── hazard_pointer.c ├── hazard_pointer.h ├── hookbench ├── hookbench.c ├── libpmmalloc.a ├── lockfree_queue.c ├── lockfree_queue.h ├── malloc_new.cpp ├── malloc_new.o ├── optional.hpp ├── pfence_util.h ├── pmmalloc.c ├── pmmalloc.h ├── pmmalloc.o ├── queue.c ├── queue.h ├── rcu_tracker.c ├── rcu_tracker.h ├── thread_util.cpp └── thread_util.hpp ├── src ├── AllocatorMacro.hpp ├── BaseMeta.cpp ├── BaseMeta.hpp ├── README.md ├── RegionManager.cpp ├── RegionManager.hpp ├── SizeClass.cpp ├── SizeClass.hpp ├── TCache.cpp ├── TCache.hpp ├── extern_val.cpp ├── pfence_util.h ├── pm_config.hpp ├── pptr.hpp ├── ralloc.cpp └── ralloc.hpp └── test ├── Makefile ├── benchmark ├── AllocatorMacro.hpp ├── HazardPointers.hpp ├── Interval-Based-Reclamation │ ├── Makefile │ ├── README.md │ ├── bin │ │ └── release │ │ │ └── trivial │ ├── data │ │ ├── history_data │ │ │ ├── bonsai_linchart_retired.pdf │ │ │ ├── bonsai_linchart_throughput.pdf │ │ │ ├── bonsai_result.csv │ │ │ ├── hashmap_linchart_retired.pdf │ │ │ ├── hashmap_linchart_throughput.pdf │ │ │ ├── hashmap_result.csv │ │ │ ├── list_linchart_retired.pdf │ │ │ ├── list_linchart_throughput.pdf │ │ │ ├── list_result.csv │ │ │ ├── natarajan_linchart_retired.pdf │ │ │ ├── natarajan_linchart_throughput.pdf │ │ │ └── natarajan_result.csv │ │ └── scripts │ │ │ └── genfigs.R │ ├── ext │ │ └── parharness │ │ │ ├── BlockPool.hpp │ │ │ ├── ConcurrentPrimitives.hpp │ │ │ ├── DefaultHarnessTests.cpp │ │ │ ├── DefaultHarnessTests.hpp │ │ │ ├── Harness.cpp │ │ │ ├── Harness.hpp │ │ │ ├── HarnessUtils.cpp │ │ │ ├── HarnessUtils.hpp │ │ │ ├── LICENSE.txt │ │ │ ├── Makefile │ │ │ ├── Makefile.32 │ │ │ ├── Makefile.64 │ │ │ ├── ParallelLaunch.cpp │ │ │ ├── ParallelLaunch.hpp │ │ │ ├── RAllocator.hpp │ │ │ ├── RContainer.hpp │ │ │ ├── README.txt │ │ │ ├── RMap.hpp │ │ │ ├── Recorder.cpp │ │ │ ├── Recorder.hpp │ │ │ ├── Rideable.hpp │ │ │ ├── SGLQueue.cpp │ │ │ ├── SGLQueue.hpp │ │ │ ├── TODO.txt │ │ │ ├── TestConfig.cpp │ │ │ ├── TestConfig.hpp │ │ │ ├── affinity │ │ │ ├── cycle1.cs.rochester.edu.aff │ │ │ ├── cycle2.cs.rochester.edu.aff │ │ │ ├── even_odds.aff │ │ │ ├── even_odds_lo_hi.aff │ │ │ ├── node2x18a.cs.rochester.edu.aff │ │ │ ├── ordered.aff │ │ │ ├── single.aff │ │ │ └── ubuntu.aff │ │ │ ├── gccLeaks.supp │ │ │ ├── license-header.txt │ │ │ ├── license.sh │ │ │ └── scripts │ │ │ ├── bonsai_intr_RCU.csv │ │ │ ├── charting-example.R │ │ │ ├── metacmd.py │ │ │ ├── repeat.py │ │ │ └── testscript.py │ └── src │ │ ├── CustomTests.cpp │ │ ├── CustomTests.hpp │ │ ├── ROrderedMap.hpp │ │ ├── RUnorderedMap.hpp │ │ ├── RetiredMonitorable.hpp │ │ ├── intmain.cpp │ │ ├── main.cpp │ │ ├── optional.hpp │ │ ├── rideables │ │ ├── LinkList.hpp │ │ ├── NatarajanTree.hpp │ │ ├── README.md │ │ ├── SGLUnorderedMap.hpp │ │ └── SortedUnorderedMap.hpp │ │ └── trackers │ │ ├── AllocatorMacro.hpp │ │ ├── BaseTracker.hpp │ │ ├── HETracker.hpp │ │ ├── HazardTracker.hpp │ │ ├── IntervalTracker.hpp │ │ ├── MemoryTracker.hpp │ │ ├── RCUTracker.hpp │ │ ├── README.md │ │ └── RangeTrackerNew.hpp ├── MichaelScottQueue.hpp ├── cpuinfo.h ├── fred.h ├── larson.cpp ├── optional.hpp ├── prod-con.cpp ├── sh6bench.cpp ├── threadtest.cpp └── timer.h ├── larson-single.sh ├── old ├── active-false-single.sh ├── arrayqueue_test.cpp ├── arraystack_test.cpp ├── base_meta_test.cpp ├── cache-scratch.cpp ├── cache-thrash.cpp ├── msqueue_test.cpp ├── passive-false-single.sh ├── pptr_test.cpp ├── region_manager_test.cpp ├── rpmalloc_test.cpp ├── run_act_false.sh ├── run_pas_false.sh └── trivial_test.cpp ├── prod-con-single.sh ├── run_all.sh ├── run_larson.sh ├── run_prod-con.sh ├── run_resur.sh ├── run_shbench.sh ├── run_threadtest.sh ├── shbench-single.sh └── threadtest-single.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | ext/* linguist-vendored 2 | test/benchmark/redis/* linguist-vendored 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/.gitmodules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2019 University of Rochester 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SConscript: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | sys.path.append('%s/library' % (Dir('#').abspath)) 4 | 5 | Import('mainEnv') 6 | buildEnv = mainEnv.Clone() 7 | 8 | buildEnv.Append(CCFLAGS = ' -O3 -g -DRALLOC -DDESTROY -fPIC') 9 | 10 | buildEnv.Append(CPPPATH = ['src']) 11 | 12 | # buildEnv.Append(CCFLAGS='-DPWB_IS_CLFLUSH') 13 | 14 | C_SRC = Split(""" 15 | src/SizeClass.cpp 16 | src/RegionManager.cpp 17 | src/TCache.cpp 18 | src/BaseMeta.cpp 19 | src/ralloc.cpp 20 | """) 21 | 22 | SRC = C_SRC 23 | 24 | rallocLibrary = buildEnv.StaticLibrary('ralloc', SRC) 25 | Return('rallocLibrary') 26 | -------------------------------------------------------------------------------- /data/larson/larson_je.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,22288515,je 3 | 2,36241120,je 4 | 4,61043899,je 5 | 6,89957652,je 6 | 10,125301834,je 7 | 16,174377545,je 8 | 20,211302587,je 9 | 24,225364074,je 10 | 32,244584051,je 11 | 40,253783551,je 12 | 48,340898472,je 13 | 62,432442411,je 14 | 72,473595749,je 15 | 80,502037145,je 16 | 84,519920268,je 17 | 88,527411800,je 18 | 1,22310505,je 19 | 2,36649246,je 20 | 4,53668102,je 21 | 6,82916220,je 22 | 10,131624713,je 23 | 16,177788429,je 24 | 20,206886780,je 25 | 24,221620719,je 26 | 32,242673126,je 27 | 40,260307469,je 28 | 48,344914084,je 29 | 62,437111468,je 30 | 72,467237956,je 31 | 80,491794596,je 32 | 84,505907512,je 33 | 88,521108948,je 34 | 1,22368348,je 35 | 2,32517099,je 36 | 4,55872415,je 37 | 6,90754676,je 38 | 10,134336045,je 39 | 16,179230171,je 40 | 20,208508202,je 41 | 24,216478437,je 42 | 32,246878046,je 43 | 40,253287748,je 44 | 48,345156449,je 45 | 62,438629330,je 46 | 72,468407475,je 47 | 80,473566584,je 48 | 84,530636773,je 49 | 88,512549489,je 50 | -------------------------------------------------------------------------------- /data/larson/larson_lr.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,19796980,lr 3 | 2,33014398,lr 4 | 4,59280880,lr 5 | 6,83188165,lr 6 | 10,102449125,lr 7 | 16,155353562,lr 8 | 20,191994900,lr 9 | 24,200213738,lr 10 | 32,220113947,lr 11 | 40,245180680,lr 12 | 48,328458498,lr 13 | 62,421261499,lr 14 | 72,464851751,lr 15 | 80,482101925,lr 16 | 84,495770168,lr 17 | 88,483276628,lr 18 | 1,19820576,lr 19 | 2,35332370,lr 20 | 4,47352595,lr 21 | 6,72168713,lr 22 | 10,112461529,lr 23 | 16,163007888,lr 24 | 20,186205105,lr 25 | 24,198846670,lr 26 | 32,217039503,lr 27 | 40,245907954,lr 28 | 48,334442451,lr 29 | 62,417467918,lr 30 | 72,466017146,lr 31 | 80,487085484,lr 32 | 84,489098256,lr 33 | 88,489045067,lr 34 | 1,19670679,lr 35 | 2,32283878,lr 36 | 4,47899847,lr 37 | 6,81053851,lr 38 | 10,118030669,lr 39 | 16,154061865,lr 40 | 20,184144582,lr 41 | 24,193024135,lr 42 | 32,216950388,lr 43 | 40,247629411,lr 44 | 48,317507219,lr 45 | 62,422579089,lr 46 | 72,456061809,lr 47 | 80,489608822,lr 48 | 84,493540776,lr 49 | 88,495573107,lr 50 | -------------------------------------------------------------------------------- /data/larson/larson_mak.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,12468908,mak 3 | 2,17782191,mak 4 | 4,24851989,mak 5 | 6,26445958,mak 6 | 10,26385031,mak 7 | 16,24273503,mak 8 | 20,24877467,mak 9 | 24,24130617,mak 10 | 32,23447950,mak 11 | 40,21945255,mak 12 | 48,16200837,mak 13 | 62,13342310,mak 14 | 72,13076681,mak 15 | 80,12736996,mak 16 | 84,13139069,mak 17 | 88,12528463,mak 18 | 1,12539943,mak 19 | 2,17992936,mak 20 | 4,25055521,mak 21 | 6,26675052,mak 22 | 10,26214201,mak 23 | 16,24347249,mak 24 | 20,24324700,mak 25 | 24,24320839,mak 26 | 32,23606197,mak 27 | 40,21835788,mak 28 | 48,16094353,mak 29 | 62,13375831,mak 30 | 72,13232660,mak 31 | 80,12874715,mak 32 | 84,12721432,mak 33 | 88,12858469,mak 34 | 1,12525780,mak 35 | 2,17810561,mak 36 | 4,24227637,mak 37 | 6,26868085,mak 38 | 10,26229480,mak 39 | 16,24087492,mak 40 | 20,23938001,mak 41 | 24,24229042,mak 42 | 32,23789298,mak 43 | 40,22132014,mak 44 | 48,16186242,mak 45 | 62,13389643,mak 46 | 72,13210364,mak 47 | 80,12769708,mak 48 | 84,13006049,mak 49 | 88,12742419,mak 50 | -------------------------------------------------------------------------------- /data/larson/larson_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,580231,pmdk 3 | 2,1051488,pmdk 4 | 4,1991687,pmdk 5 | 6,2936189,pmdk 6 | 10,4585400,pmdk 7 | 16,6538250,pmdk 8 | 20,7962525,pmdk 9 | 24,8680952,pmdk 10 | 32,9821663,pmdk 11 | 40,10149923,pmdk 12 | 48,9265951,pmdk 13 | 62,7612015,pmdk 14 | 72,7019184,pmdk 15 | 80,6563356,pmdk 16 | 84,6500558,pmdk 17 | 88,6494678,pmdk 18 | 1,582096,pmdk 19 | 2,1057859,pmdk 20 | 4,2024278,pmdk 21 | 6,2959080,pmdk 22 | 10,4583635,pmdk 23 | 16,6569580,pmdk 24 | 20,7936751,pmdk 25 | 24,8674145,pmdk 26 | 32,9864283,pmdk 27 | 40,10050798,pmdk 28 | 48,9335331,pmdk 29 | 62,7651832,pmdk 30 | 72,6879561,pmdk 31 | 80,6453398,pmdk 32 | 84,6517637,pmdk 33 | 88,6445595,pmdk 34 | 1,574124,pmdk 35 | 2,1038012,pmdk 36 | 4,2063061,pmdk 37 | 6,2935242,pmdk 38 | 10,4603065,pmdk 39 | 16,6556316,pmdk 40 | 20,7618314,pmdk 41 | 24,8670209,pmdk 42 | 32,9855438,pmdk 43 | 40,10164077,pmdk 44 | 48,9330860,pmdk 45 | 62,7633339,pmdk 46 | 72,6904903,pmdk 47 | 80,6547995,pmdk 48 | 84,6471078,pmdk 49 | 88,6452828,pmdk 50 | -------------------------------------------------------------------------------- /data/larson/larson_r.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,19063597,r 3 | 2,28880660,r 4 | 4,46204618,r 5 | 6,74050767,r 6 | 10,117062813,r 7 | 16,158289665,r 8 | 20,175882846,r 9 | 24,185562734,r 10 | 32,214918194,r 11 | 40,236590179,r 12 | 48,325721659,r 13 | 62,420272633,r 14 | 72,450806164,r 15 | 80,471079644,r 16 | 84,473419203,r 17 | 88,478008137,r 18 | 1,18982369,r 19 | 2,33177617,r 20 | 4,54524306,r 21 | 6,81484884,r 22 | 10,113398753,r 23 | 16,151817985,r 24 | 20,177995764,r 25 | 24,190076960,r 26 | 32,212558971,r 27 | 40,239477420,r 28 | 48,321867446,r 29 | 62,415177413,r 30 | 72,452659815,r 31 | 80,468119027,r 32 | 84,476442799,r 33 | 88,480968508,r 34 | 1,19022476,r 35 | 2,35405598,r 36 | 4,46211358,r 37 | 6,71146372,r 38 | 10,118928285,r 39 | 16,157198482,r 40 | 20,182646639,r 41 | 24,194245841,r 42 | 32,213877307,r 43 | 40,231036328,r 44 | 48,322615616,r 45 | 62,415344072,r 46 | 72,453508667,r 47 | 80,475570416,r 48 | 84,478419269,r 49 | 88,481552453,r 50 | -------------------------------------------------------------------------------- /data/larson_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/larson_linchart.pdf -------------------------------------------------------------------------------- /data/mm-uncached/larson/larson_je.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,22740999,je 3 | 2,31924211,je 4 | 4,50353201,je 5 | 6,87726259,je 6 | 10,125025740,je 7 | 16,174583659,je 8 | 20,213142935,je 9 | 24,223469360,je 10 | 32,253035254,je 11 | 40,283174973,je 12 | 48,373766564,je 13 | 60,466323634,je 14 | 72,510634877,je 15 | 80,524934435,je 16 | 84,532964701,je 17 | 88,538592445,je 18 | 1,22744759,je 19 | 2,30730747,je 20 | 4,51172334,je 21 | 6,81033066,je 22 | 10,127576426,je 23 | 16,180383350,je 24 | 20,215188293,je 25 | 24,226967840,je 26 | 32,249164583,je 27 | 40,282997291,je 28 | 48,362169654,je 29 | 60,465853668,je 30 | 72,511918964,je 31 | 80,529279541,je 32 | 84,533630139,je 33 | 88,531489697,je 34 | 1,22742635,je 35 | 2,26275090,je 36 | 4,53262050,je 37 | 6,85654691,je 38 | 10,133427405,je 39 | 16,181156755,je 40 | 20,211791785,je 41 | 24,225695749,je 42 | 32,249273838,je 43 | 40,279474067,je 44 | 48,369642144,je 45 | 60,439066470,je 46 | 72,514488379,je 47 | 80,529068982,je 48 | 84,532191243,je 49 | 88,533960012,je 50 | -------------------------------------------------------------------------------- /data/mm-uncached/larson/larson_lr.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,26786040,lr 3 | 2,49417682,lr 4 | 4,63364903,lr 5 | 6,91047286,lr 6 | 10,152252686,lr 7 | 16,207414293,lr 8 | 20,244916795,lr 9 | 24,259769510,lr 10 | 32,286416360,lr 11 | 40,312023143,lr 12 | 48,414296020,lr 13 | 60,524405932,lr 14 | 72,550944762,lr 15 | 80,558886794,lr 16 | 84,564463359,lr 17 | 88,572485940,lr 18 | 1,26829761,lr 19 | 2,36976558,lr 20 | 4,74712153,lr 21 | 6,92524221,lr 22 | 10,147583489,lr 23 | 16,195096411,lr 24 | 20,239236313,lr 25 | 24,254989019,lr 26 | 32,282368056,lr 27 | 40,320281266,lr 28 | 48,414705317,lr 29 | 60,515406632,lr 30 | 72,553553560,lr 31 | 80,563943352,lr 32 | 84,568762076,lr 33 | 88,570196703,lr 34 | 1,26810798,lr 35 | 2,49337806,lr 36 | 4,59743005,lr 37 | 6,99580764,lr 38 | 10,154537746,lr 39 | 16,202645463,lr 40 | 20,261434309,lr 41 | 24,256337007,lr 42 | 32,284174044,lr 43 | 40,314055095,lr 44 | 48,411308528,lr 45 | 60,524646161,lr 46 | 72,548784066,lr 47 | 80,566448205,lr 48 | 84,565608352,lr 49 | 88,576669831,lr 50 | -------------------------------------------------------------------------------- /data/mm-uncached/larson/larson_mak.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,13446965,mak 3 | 2,23189103,mak 4 | 4,45169082,mak 5 | 6,65036163,mak 6 | 10,98011869,mak 7 | 16,127916090,mak 8 | 20,160774807,mak 9 | 24,164914601,mak 10 | 32,183883717,mak 11 | 40,200231555,mak 12 | 48,270135823,mak 13 | 60,342244855,mak 14 | 72,372483467,mak 15 | 80,389310904,mak 16 | 84,392490450,mak 17 | 88,395978014,mak 18 | 1,13419817,mak 19 | 2,24713932,mak 20 | 4,46745923,mak 21 | 6,63185210,mak 22 | 10,100082324,mak 23 | 16,131518551,mak 24 | 20,157650066,mak 25 | 24,166567257,mak 26 | 32,183255760,mak 27 | 40,200717674,mak 28 | 48,269088887,mak 29 | 60,346867757,mak 30 | 72,372341693,mak 31 | 80,390796224,mak 32 | 84,393292651,mak 33 | 88,394776715,mak 34 | 1,13425059,mak 35 | 2,25556350,mak 36 | 4,48146707,mak 37 | 6,61837630,mak 38 | 10,92965523,mak 39 | 16,135516768,mak 40 | 20,162816940,mak 41 | 24,165406982,mak 42 | 32,183989947,mak 43 | 40,198885090,mak 44 | 48,269000873,mak 45 | 60,345494894,mak 46 | 72,374051700,mak 47 | 80,391334617,mak 48 | 84,393734804,mak 49 | 88,396834811,mak 50 | -------------------------------------------------------------------------------- /data/mm-uncached/larson/larson_r.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,20373597,r 3 | 2,34677305,r 4 | 4,64687911,r 5 | 6,85756637,r 6 | 10,122917129,r 7 | 16,168468957,r 8 | 20,210173310,r 9 | 24,215370840,r 10 | 32,238988440,r 11 | 40,270375640,r 12 | 48,350550335,r 13 | 60,444225078,r 14 | 72,485222657,r 15 | 80,505031538,r 16 | 84,511426155,r 17 | 88,510100777,r 18 | 1,20417275,r 19 | 2,32413280,r 20 | 4,60992055,r 21 | 6,89308821,r 22 | 10,132245518,r 23 | 16,173609428,r 24 | 20,202814159,r 25 | 24,218138492,r 26 | 32,238965285,r 27 | 40,265010381,r 28 | 48,347680078,r 29 | 60,439731283,r 30 | 72,485459660,r 31 | 80,505318310,r 32 | 84,508552332,r 33 | 88,510196206,r 34 | 1,20421316,r 35 | 2,33818142,r 36 | 4,62909325,r 37 | 6,78878209,r 38 | 10,129331417,r 39 | 16,171570833,r 40 | 20,203512546,r 41 | 24,215625729,r 42 | 32,240930445,r 43 | 40,260857781,r 44 | 48,351879535,r 45 | 60,448387190,r 46 | 72,485564904,r 47 | 80,504361839,r 48 | 84,505604263,r 49 | 88,511185059,r 50 | -------------------------------------------------------------------------------- /data/mm-uncached/larson_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/mm-uncached/larson_linchart.pdf -------------------------------------------------------------------------------- /data/mm-uncached/prod-con/prod-con_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,2.086780,je 3 | 4,1.336798,je 4 | 6,0.924752,je 5 | 10,0.574552,je 6 | 16,0.411121,je 7 | 20,0.336518,je 8 | 24,0.319735,je 9 | 32,0.258214,je 10 | 40,0.214739,je 11 | 48,0.180938,je 12 | 60,0.149815,je 13 | 72,0.129166,je 14 | 80,0.121992,je 15 | 84,0.187837,je 16 | 88,0.202448,je 17 | 2,2.819049,je 18 | 4,1.341156,je 19 | 6,0.915617,je 20 | 10,0.554327,je 21 | 16,0.384302,je 22 | 20,0.328240,je 23 | 24,0.327208,je 24 | 32,0.255645,je 25 | 40,0.212671,je 26 | 48,0.181408,je 27 | 60,0.149664,je 28 | 72,0.131389,je 29 | 80,0.117689,je 30 | 84,0.174529,je 31 | 88,0.206952,je 32 | 2,2.646120,je 33 | 4,1.343785,je 34 | 6,0.956780,je 35 | 10,0.569461,je 36 | 16,0.401506,je 37 | 20,0.327957,je 38 | 24,0.316965,je 39 | 32,0.254267,je 40 | 40,0.215155,je 41 | 48,0.180278,je 42 | 60,0.149194,je 43 | 72,0.134525,je 44 | 80,0.118743,je 45 | 84,0.166957,je 46 | 88,0.201136,je 47 | -------------------------------------------------------------------------------- /data/mm-uncached/prod-con/prod-con_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.314715,lr 3 | 4,1.684039,lr 4 | 6,1.134138,lr 5 | 10,0.719320,lr 6 | 16,0.496439,lr 7 | 20,0.420021,lr 8 | 24,0.397168,lr 9 | 32,0.384758,lr 10 | 40,0.475686,lr 11 | 48,0.672842,lr 12 | 60,0.799500,lr 13 | 72,0.876531,lr 14 | 80,0.892769,lr 15 | 84,2.120980,lr 16 | 88,2.570750,lr 17 | 2,3.284224,lr 18 | 4,1.712080,lr 19 | 6,1.141495,lr 20 | 10,0.722706,lr 21 | 16,0.490553,lr 22 | 20,0.421080,lr 23 | 24,0.399232,lr 24 | 32,0.392421,lr 25 | 40,0.467197,lr 26 | 48,0.675063,lr 27 | 60,0.814521,lr 28 | 72,0.879707,lr 29 | 80,0.930390,lr 30 | 84,1.607436,lr 31 | 88,2.639021,lr 32 | 2,3.267199,lr 33 | 4,1.683502,lr 34 | 6,1.160317,lr 35 | 10,0.725652,lr 36 | 16,0.486937,lr 37 | 20,0.417381,lr 38 | 24,0.403090,lr 39 | 32,0.387457,lr 40 | 40,0.460827,lr 41 | 48,0.658828,lr 42 | 60,0.835402,lr 43 | 72,0.884284,lr 44 | 80,0.914000,lr 45 | 84,1.820171,lr 46 | 88,2.629396,lr 47 | -------------------------------------------------------------------------------- /data/mm-uncached/prod-con/prod-con_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,4.005566,mak 3 | 4,2.140574,mak 4 | 6,1.450410,mak 5 | 10,1.109268,mak 6 | 16,0.998706,mak 7 | 20,0.985998,mak 8 | 24,0.992011,mak 9 | 32,0.976510,mak 10 | 40,1.014031,mak 11 | 48,1.303511,mak 12 | 60,1.482304,mak 13 | 72,1.513361,mak 14 | 80,1.638432,mak 15 | 84,1.630741,mak 16 | 88,1.502868,mak 17 | 2,3.941047,mak 18 | 4,2.126431,mak 19 | 6,1.391044,mak 20 | 10,1.103323,mak 21 | 16,1.011114,mak 22 | 20,0.993711,mak 23 | 24,0.987416,mak 24 | 32,0.972554,mak 25 | 40,1.020121,mak 26 | 48,1.306554,mak 27 | 60,1.466790,mak 28 | 72,1.579989,mak 29 | 80,1.607891,mak 30 | 84,1.643571,mak 31 | 88,1.613187,mak 32 | 2,4.000599,mak 33 | 4,2.056216,mak 34 | 6,1.381970,mak 35 | 10,1.132592,mak 36 | 16,0.990332,mak 37 | 20,0.975182,mak 38 | 24,0.991063,mak 39 | 32,0.980236,mak 40 | 40,1.023758,mak 41 | 48,1.285268,mak 42 | 60,1.486566,mak 43 | 72,1.585180,mak 44 | 80,1.611182,mak 45 | 84,1.646733,mak 46 | 88,1.582646,mak 47 | -------------------------------------------------------------------------------- /data/mm-uncached/prod-con/prod-con_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.854974,r 3 | 4,2.063869,r 4 | 6,1.355970,r 5 | 10,0.873292,r 6 | 16,0.596536,r 7 | 20,0.503188,r 8 | 24,0.532866,r 9 | 32,0.417023,r 10 | 40,0.345611,r 11 | 48,0.293976,r 12 | 60,0.242516,r 13 | 72,0.207482,r 14 | 80,0.194418,r 15 | 84,0.282230,r 16 | 88,0.290439,r 17 | 2,3.895405,r 18 | 4,2.047194,r 19 | 6,1.424689,r 20 | 10,0.871357,r 21 | 16,0.604386,r 22 | 20,0.502236,r 23 | 24,0.535716,r 24 | 32,0.415181,r 25 | 40,0.345508,r 26 | 48,0.291092,r 27 | 60,0.250476,r 28 | 72,0.206878,r 29 | 80,0.191934,r 30 | 84,0.254564,r 31 | 88,0.406467,r 32 | 2,3.895249,r 33 | 4,2.023493,r 34 | 6,1.411343,r 35 | 10,0.876567,r 36 | 16,0.611245,r 37 | 20,0.504367,r 38 | 24,0.533963,r 39 | 32,0.415949,r 40 | 40,0.344305,r 41 | 48,0.297075,r 42 | 60,0.239733,r 43 | 72,0.214560,r 44 | 80,0.199196,r 45 | 84,0.248980,r 46 | 88,0.362317,r 47 | -------------------------------------------------------------------------------- /data/mm-uncached/prod-con_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/mm-uncached/prod-con_linchart.pdf -------------------------------------------------------------------------------- /data/mm-uncached/shbench/shbench_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,28.557994,je 3 | 2,13.608287,je 4 | 4,7.028729,je 5 | 6,4.808097,je 6 | 10,2.958687,je 7 | 16,2.075327,je 8 | 20,1.757223,je 9 | 24,2.307808,je 10 | 32,1.752882,je 11 | 40,1.504987,je 12 | 48,1.304641,je 13 | 60,1.027228,je 14 | 72,0.853472,je 15 | 80,0.734251,je 16 | 84,1.015210,je 17 | 88,1.008858,je 18 | 1,28.514680,je 19 | 2,13.592654,je 20 | 4,7.029677,je 21 | 6,4.785195,je 22 | 10,2.963538,je 23 | 16,2.048890,je 24 | 20,1.750391,je 25 | 24,2.322762,je 26 | 32,1.760359,je 27 | 40,1.503242,je 28 | 48,1.302685,je 29 | 60,1.027092,je 30 | 72,0.856452,je 31 | 80,0.729260,je 32 | 84,1.120088,je 33 | 88,0.994238,je 34 | 1,28.522198,je 35 | 2,13.630732,je 36 | 4,7.118647,je 37 | 6,4.773085,je 38 | 10,2.974010,je 39 | 16,2.070398,je 40 | 20,1.759696,je 41 | 24,2.322431,je 42 | 32,1.776425,je 43 | 40,1.512197,je 44 | 48,1.304776,je 45 | 60,1.036314,je 46 | 72,0.847728,je 47 | 80,0.731736,je 48 | 84,1.013824,je 49 | 88,0.980031,je 50 | -------------------------------------------------------------------------------- /data/mm-uncached/shbench/shbench_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,8.296798,lr 3 | 2,3.774358,lr 4 | 4,1.896884,lr 5 | 6,1.315760,lr 6 | 10,0.761194,lr 7 | 16,0.541158,lr 8 | 20,0.477770,lr 9 | 24,0.628087,lr 10 | 32,0.514459,lr 11 | 40,0.513314,lr 12 | 48,0.578439,lr 13 | 60,0.962935,lr 14 | 72,0.696874,lr 15 | 80,0.967473,lr 16 | 84,2.345138,lr 17 | 88,2.991148,lr 18 | 1,8.457774,lr 19 | 2,3.769204,lr 20 | 4,1.898501,lr 21 | 6,1.316293,lr 22 | 10,0.762523,lr 23 | 16,0.536615,lr 24 | 20,0.477102,lr 25 | 24,0.628476,lr 26 | 32,0.515047,lr 27 | 40,0.511877,lr 28 | 48,0.584036,lr 29 | 60,0.994805,lr 30 | 72,0.697529,lr 31 | 80,1.093346,lr 32 | 84,2.093842,lr 33 | 88,3.823106,lr 34 | 1,8.433010,lr 35 | 2,3.774620,lr 36 | 4,1.901752,lr 37 | 6,1.316944,lr 38 | 10,0.763588,lr 39 | 16,0.536429,lr 40 | 20,0.477364,lr 41 | 24,0.628920,lr 42 | 32,0.516435,lr 43 | 40,0.507637,lr 44 | 48,0.583478,lr 45 | 60,0.995236,lr 46 | 72,0.697722,lr 47 | 80,0.963691,lr 48 | 84,2.049373,lr 49 | 88,2.532658,lr 50 | -------------------------------------------------------------------------------- /data/mm-uncached/shbench/shbench_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,76.917590,mak 3 | 2,27.143926,mak 4 | 4,15.593266,mak 5 | 6,12.060025,mak 6 | 10,10.733800,mak 7 | 16,9.218058,mak 8 | 20,9.166472,mak 9 | 24,9.250541,mak 10 | 32,8.421599,mak 11 | 40,8.757332,mak 12 | 48,14.228523,mak 13 | 60,17.413115,mak 14 | 72,18.539708,mak 15 | 80,19.186136,mak 16 | 84,17.005948,mak 17 | 88,15.557127,mak 18 | 1,79.159071,mak 19 | 2,26.928991,mak 20 | 4,15.583941,mak 21 | 6,11.996832,mak 22 | 10,10.858229,mak 23 | 16,9.274620,mak 24 | 20,9.254853,mak 25 | 24,9.235917,mak 26 | 32,8.448384,mak 27 | 40,8.784130,mak 28 | 48,14.707392,mak 29 | 60,17.370722,mak 30 | 72,17.395291,mak 31 | 80,18.195112,mak 32 | 84,16.356746,mak 33 | 88,16.071761,mak 34 | 1,78.960804,mak 35 | 2,27.040068,mak 36 | 4,15.581995,mak 37 | 6,12.063006,mak 38 | 10,10.732157,mak 39 | 16,9.263183,mak 40 | 20,9.228438,mak 41 | 24,9.205621,mak 42 | 32,8.453309,mak 43 | 40,8.741333,mak 44 | 48,14.269115,mak 45 | 60,17.361644,mak 46 | 72,18.218889,mak 47 | 80,18.569460,mak 48 | 84,16.043415,mak 49 | 88,15.609725,mak 50 | -------------------------------------------------------------------------------- /data/mm-uncached/shbench/shbench_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,13.355126,r 3 | 2,6.404917,r 4 | 4,3.217747,r 5 | 6,2.266482,r 6 | 10,1.301940,r 7 | 16,0.917138,r 8 | 20,0.792453,r 9 | 24,1.053848,r 10 | 32,0.825525,r 11 | 40,0.717562,r 12 | 48,0.815566,r 13 | 60,0.821682,r 14 | 72,0.875918,r 15 | 80,0.980604,r 16 | 84,1.105729,r 17 | 88,0.936880,r 18 | 1,13.151178,r 19 | 2,6.415993,r 20 | 4,3.217529,r 21 | 6,2.272445,r 22 | 10,1.307267,r 23 | 16,0.913142,r 24 | 20,0.793592,r 25 | 24,1.052322,r 26 | 32,0.822325,r 27 | 40,0.728017,r 28 | 48,0.811692,r 29 | 60,0.822175,r 30 | 72,0.865804,r 31 | 80,0.978746,r 32 | 84,1.087774,r 33 | 88,0.946150,r 34 | 1,13.167889,r 35 | 2,6.400683,r 36 | 4,3.210246,r 37 | 6,2.257337,r 38 | 10,1.304032,r 39 | 16,0.913469,r 40 | 20,0.792734,r 41 | 24,1.049744,r 42 | 32,0.820732,r 43 | 40,0.718130,r 44 | 48,0.803393,r 45 | 60,0.818283,r 46 | 72,0.867768,r 47 | 80,0.992901,r 48 | 84,1.085049,r 49 | 88,0.932395,r 50 | -------------------------------------------------------------------------------- /data/mm-uncached/shbench_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/mm-uncached/shbench_linchart.pdf -------------------------------------------------------------------------------- /data/mm-uncached/threadtest/threadtest_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,38.745094,je 3 | 2,18.840488,je 4 | 4,9.646516,je 5 | 6,6.549557,je 6 | 10,4.194552,je 7 | 16,3.105643,je 8 | 20,2.597296,je 9 | 24,3.582108,je 10 | 32,2.862805,je 11 | 40,2.583853,je 12 | 48,2.149911,je 13 | 60,1.694370,je 14 | 72,1.402568,je 15 | 80,1.253945,je 16 | 84,1.626990,je 17 | 88,1.519992,je 18 | 1,38.555217,je 19 | 2,18.823424,je 20 | 4,9.639470,je 21 | 6,6.549551,je 22 | 10,4.190215,je 23 | 16,3.224454,je 24 | 20,2.630367,je 25 | 24,3.588690,je 26 | 32,2.867520,je 27 | 40,2.575478,je 28 | 48,2.135531,je 29 | 60,1.716964,je 30 | 72,1.408782,je 31 | 80,1.265865,je 32 | 84,1.626521,je 33 | 88,1.523764,je 34 | 1,38.563432,je 35 | 2,18.858798,je 36 | 4,9.665349,je 37 | 6,6.553878,je 38 | 10,4.193122,je 39 | 16,3.108503,je 40 | 20,2.635120,je 41 | 24,3.579783,je 42 | 32,2.858967,je 43 | 40,2.580168,je 44 | 48,2.126695,je 45 | 60,1.706440,je 46 | 72,1.391887,je 47 | 80,1.254009,je 48 | 84,1.638623,je 49 | 88,1.527422,je 50 | -------------------------------------------------------------------------------- /data/mm-uncached/threadtest/threadtest_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,33.141721,lr 3 | 2,16.376868,lr 4 | 4,6.175831,lr 5 | 6,4.243771,lr 6 | 10,2.806620,lr 7 | 16,2.266148,lr 8 | 20,2.094973,lr 9 | 24,2.341966,lr 10 | 32,2.023554,lr 11 | 40,1.793302,lr 12 | 48,6.353805,lr 13 | 60,10.086470,lr 14 | 72,11.580511,lr 15 | 80,14.301140,lr 16 | 84,13.223685,lr 17 | 88,10.681257,lr 18 | 1,32.838150,lr 19 | 2,15.636617,lr 20 | 4,6.211252,lr 21 | 6,4.248901,lr 22 | 10,2.784799,lr 23 | 16,2.247228,lr 24 | 20,2.095447,lr 25 | 24,2.330113,lr 26 | 32,2.028009,lr 27 | 40,1.806202,lr 28 | 48,6.353022,lr 29 | 60,10.007317,lr 30 | 72,12.446661,lr 31 | 80,12.575140,lr 32 | 84,12.821451,lr 33 | 88,9.257601,lr 34 | 1,32.802896,lr 35 | 2,15.107123,lr 36 | 4,6.153375,lr 37 | 6,4.236141,lr 38 | 10,2.794744,lr 39 | 16,2.261788,lr 40 | 20,2.082684,lr 41 | 24,2.341934,lr 42 | 32,2.029684,lr 43 | 40,1.814099,lr 44 | 48,6.444999,lr 45 | 60,10.012518,lr 46 | 72,12.727933,lr 47 | 80,11.771121,lr 48 | 84,10.974186,lr 49 | 88,9.967966,lr 50 | -------------------------------------------------------------------------------- /data/mm-uncached/threadtest/threadtest_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,303.367965,mak 3 | 2,50.492045,mak 4 | 4,47.012765,mak 5 | 6,45.357934,mak 6 | 10,39.402056,mak 7 | 16,47.313598,mak 8 | 20,54.093555,mak 9 | 24,48.118457,mak 10 | 32,47.993445,mak 11 | 40,51.347989,mak 12 | 48,83.200486,mak 13 | 60,108.191648,mak 14 | 72,117.787648,mak 15 | 80,115.276999,mak 16 | 84,112.911253,mak 17 | 88,99.798384,mak 18 | 1,312.764733,mak 19 | 2,50.848450,mak 20 | 4,46.829120,mak 21 | 6,45.310172,mak 22 | 10,40.253985,mak 23 | 16,47.151330,mak 24 | 20,54.176194,mak 25 | 24,48.569081,mak 26 | 32,48.187748,mak 27 | 40,51.753365,mak 28 | 48,83.733204,mak 29 | 60,111.173329,mak 30 | 72,122.870754,mak 31 | 80,121.188067,mak 32 | 84,120.449920,mak 33 | 88,100.896560,mak 34 | 1,288.538107,mak 35 | 2,51.294584,mak 36 | 4,47.012031,mak 37 | 6,44.992738,mak 38 | 10,40.160899,mak 39 | 16,46.892893,mak 40 | 20,54.303518,mak 41 | 24,48.591972,mak 42 | 32,47.869378,mak 43 | 40,51.530496,mak 44 | 48,84.047917,mak 45 | 60,107.956047,mak 46 | 72,116.968242,mak 47 | 80,120.720805,mak 48 | 84,118.262281,mak 49 | 88,100.024002,mak 50 | -------------------------------------------------------------------------------- /data/mm-uncached/threadtest/threadtest_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,27.689310,r 3 | 2,13.720392,r 4 | 4,7.282592,r 5 | 6,5.090221,r 6 | 10,3.358278,r 7 | 16,2.613798,r 8 | 20,2.421227,r 9 | 24,3.074885,r 10 | 32,2.655486,r 11 | 40,2.292981,r 12 | 48,3.980881,r 13 | 60,3.630120,r 14 | 72,4.175072,r 15 | 80,4.285921,r 16 | 84,6.225608,r 17 | 88,4.701796,r 18 | 1,27.058809,r 19 | 2,13.726597,r 20 | 4,7.276258,r 21 | 6,5.089751,r 22 | 10,3.358178,r 23 | 16,2.623270,r 24 | 20,2.403656,r 25 | 24,3.088524,r 26 | 32,2.673848,r 27 | 40,2.284919,r 28 | 48,3.751423,r 29 | 60,3.913868,r 30 | 72,4.557172,r 31 | 80,13.712215,r 32 | 84,5.494579,r 33 | 88,5.710189,r 34 | 1,27.019435,r 35 | 2,13.717893,r 36 | 4,7.279726,r 37 | 6,5.093858,r 38 | 10,3.366461,r 39 | 16,2.628613,r 40 | 20,2.412243,r 41 | 24,3.096020,r 42 | 32,2.677845,r 43 | 40,2.283331,r 44 | 48,3.872769,r 45 | 60,3.718732,r 46 | 72,5.021047,r 47 | 80,4.862219,r 48 | 84,4.970311,r 49 | 88,4.705975,r 50 | -------------------------------------------------------------------------------- /data/mm-uncached/threadtest_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/mm-uncached/threadtest_linchart.pdf -------------------------------------------------------------------------------- /data/prod-con/prod-con_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,2.397295,je 3 | 4,1.192234,je 4 | 6,0.944294,je 5 | 10,0.596778,je 6 | 16,0.395868,je 7 | 20,0.330924,je 8 | 24,0.322772,je 9 | 32,0.251515,je 10 | 40,0.211747,je 11 | 48,0.178917,je 12 | 62,0.143303,je 13 | 72,0.125675,je 14 | 80,0.117974,je 15 | 84,0.189575,je 16 | 88,0.223214,je 17 | 2,2.257159,je 18 | 4,1.355456,je 19 | 6,0.937433,je 20 | 10,0.587279,je 21 | 16,0.388988,je 22 | 20,0.346650,je 23 | 24,0.328847,je 24 | 32,0.262089,je 25 | 40,0.212558,je 26 | 48,0.181492,je 27 | 62,0.145198,je 28 | 72,0.131824,je 29 | 80,0.123002,je 30 | 84,0.189103,je 31 | 88,0.180697,je 32 | 2,2.159373,je 33 | 4,1.378225,je 34 | 6,0.906787,je 35 | 10,0.572650,je 36 | 16,0.393862,je 37 | 20,0.331902,je 38 | 24,0.329538,je 39 | 32,0.252487,je 40 | 40,0.209516,je 41 | 48,0.181392,je 42 | 62,0.147694,je 43 | 72,0.126946,je 44 | 80,0.121424,je 45 | 84,0.194119,je 46 | 88,0.198875,je 47 | -------------------------------------------------------------------------------- /data/prod-con/prod-con_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.493371,lr 3 | 4,1.760528,lr 4 | 6,1.193033,lr 5 | 10,0.769837,lr 6 | 16,0.526641,lr 7 | 20,0.443145,lr 8 | 24,0.489042,lr 9 | 32,0.382715,lr 10 | 40,0.321522,lr 11 | 48,0.279536,lr 12 | 62,0.234592,lr 13 | 72,0.217199,lr 14 | 80,0.217496,lr 15 | 84,0.292078,lr 16 | 88,0.357527,lr 17 | 2,3.424968,lr 18 | 4,1.854587,lr 19 | 6,1.208738,lr 20 | 10,0.769859,lr 21 | 16,0.524924,lr 22 | 20,0.442100,lr 23 | 24,0.483028,lr 24 | 32,0.378453,lr 25 | 40,0.319840,lr 26 | 48,0.275346,lr 27 | 62,0.234778,lr 28 | 72,0.207412,lr 29 | 80,0.198895,lr 30 | 84,0.313771,lr 31 | 88,0.355397,lr 32 | 2,3.402807,lr 33 | 4,1.767182,lr 34 | 6,1.198830,lr 35 | 10,0.758486,lr 36 | 16,0.535006,lr 37 | 20,0.444940,lr 38 | 24,0.483583,lr 39 | 32,0.379119,lr 40 | 40,0.322291,lr 41 | 48,0.275550,lr 42 | 62,0.230538,lr 43 | 72,0.212313,lr 44 | 80,0.209103,lr 45 | 84,0.322074,lr 46 | 88,0.379896,lr 47 | -------------------------------------------------------------------------------- /data/prod-con/prod-con_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.742373,mak 3 | 4,1.933167,mak 4 | 6,1.336598,mak 5 | 10,1.100977,mak 6 | 16,0.996669,mak 7 | 20,0.962869,mak 8 | 24,0.969449,mak 9 | 32,0.982519,mak 10 | 40,1.037254,mak 11 | 48,1.203755,mak 12 | 62,1.404993,mak 13 | 72,1.533159,mak 14 | 80,1.585496,mak 15 | 84,1.569754,mak 16 | 88,1.582908,mak 17 | 2,3.588682,mak 18 | 4,2.032099,mak 19 | 6,1.354223,mak 20 | 10,1.109248,mak 21 | 16,0.987123,mak 22 | 20,0.937632,mak 23 | 24,0.979654,mak 24 | 32,0.976436,mak 25 | 40,1.035377,mak 26 | 48,1.186940,mak 27 | 62,1.414964,mak 28 | 72,1.517948,mak 29 | 80,1.572287,mak 30 | 84,1.603173,mak 31 | 88,1.563158,mak 32 | 2,3.900667,mak 33 | 4,1.942928,mak 34 | 6,1.255774,mak 35 | 10,1.125590,mak 36 | 16,0.983499,mak 37 | 20,0.957397,mak 38 | 24,0.963517,mak 39 | 32,0.988464,mak 40 | 40,1.033748,mak 41 | 48,1.202315,mak 42 | 62,1.414313,mak 43 | 72,1.533429,mak 44 | 80,1.581552,mak 45 | 84,1.576556,mak 46 | 88,1.587765,mak 47 | -------------------------------------------------------------------------------- /data/prod-con/prod-con_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,37.967350,pmdk 3 | 4,20.941505,pmdk 4 | 6,14.251853,pmdk 5 | 10,9.182683,pmdk 6 | 16,5.863082,pmdk 7 | 20,4.946540,pmdk 8 | 24,6.248927,pmdk 9 | 32,4.761294,pmdk 10 | 40,4.158280,pmdk 11 | 48,3.489535,pmdk 12 | 62,2.800208,pmdk 13 | 72,2.496359,pmdk 14 | 80,2.314643,pmdk 15 | 84,2.183881,pmdk 16 | 88,2.250340,pmdk 17 | 2,40.105178,pmdk 18 | 4,21.177296,pmdk 19 | 6,14.414528,pmdk 20 | 10,9.450762,pmdk 21 | 16,6.177028,pmdk 22 | 20,5.237224,pmdk 23 | 24,6.118436,pmdk 24 | 32,4.709933,pmdk 25 | 40,4.078010,pmdk 26 | 48,3.211783,pmdk 27 | 62,2.745359,pmdk 28 | 72,2.522423,pmdk 29 | 80,2.262646,pmdk 30 | 84,2.217895,pmdk 31 | 88,2.165677,pmdk 32 | 2,36.850019,pmdk 33 | 4,22.160946,pmdk 34 | 6,14.349642,pmdk 35 | 10,9.101067,pmdk 36 | 16,5.935472,pmdk 37 | 20,5.365540,pmdk 38 | 24,6.154130,pmdk 39 | 32,4.865448,pmdk 40 | 40,4.130145,pmdk 41 | 48,3.405016,pmdk 42 | 62,2.894886,pmdk 43 | 72,2.479783,pmdk 44 | 80,2.232129,pmdk 45 | 84,2.207042,pmdk 46 | 88,2.260614,pmdk 47 | -------------------------------------------------------------------------------- /data/prod-con/prod-con_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.445495,r 3 | 4,1.805358,r 4 | 6,1.231782,r 5 | 10,0.773878,r 6 | 16,0.542571,r 7 | 20,0.443252,r 8 | 24,0.486512,r 9 | 32,0.379112,r 10 | 40,0.320625,r 11 | 48,0.279511,r 12 | 62,0.236604,r 13 | 72,0.215484,r 14 | 80,0.197342,r 15 | 84,0.292476,r 16 | 88,0.351171,r 17 | 2,3.438080,r 18 | 4,1.825717,r 19 | 6,1.216468,r 20 | 10,0.768168,r 21 | 16,0.528726,r 22 | 20,0.443449,r 23 | 24,0.486734,r 24 | 32,0.395176,r 25 | 40,0.319621,r 26 | 48,0.277167,r 27 | 62,0.228613,r 28 | 72,0.212170,r 29 | 80,0.213090,r 30 | 84,0.329179,r 31 | 88,0.380342,r 32 | 2,3.413041,r 33 | 4,1.812792,r 34 | 6,1.225621,r 35 | 10,0.770961,r 36 | 16,0.520612,r 37 | 20,0.446718,r 38 | 24,0.485884,r 39 | 32,0.384800,r 40 | 40,0.321172,r 41 | 48,0.275012,r 42 | 62,0.233809,r 43 | 72,0.211517,r 44 | 80,0.202688,r 45 | 84,0.347086,r 46 | 88,0.332808,r 47 | -------------------------------------------------------------------------------- /data/prod-con_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/prod-con_linchart.pdf -------------------------------------------------------------------------------- /data/shbench/shbench_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,4.490977,je 3 | 2,2.170551,je 4 | 4,1.117229,je 5 | 6,0.764475,je 6 | 10,0.474814,je 7 | 16,0.330329,je 8 | 20,0.266227,je 9 | 24,0.356950,je 10 | 32,0.274615,je 11 | 40,0.220112,je 12 | 48,0.189615,je 13 | 62,0.140335,je 14 | 72,0.126831,je 15 | 80,0.117773,je 16 | 84,0.144245,je 17 | 88,0.171531,je 18 | 1,4.515050,je 19 | 2,2.174533,je 20 | 4,1.116393,je 21 | 6,0.762168,je 22 | 10,0.468439,je 23 | 16,0.324515,je 24 | 20,0.265070,je 25 | 24,0.361873,je 26 | 32,0.272638,je 27 | 40,0.221594,je 28 | 48,0.189268,je 29 | 62,0.144897,je 30 | 72,0.124632,je 31 | 80,0.119681,je 32 | 84,0.154334,je 33 | 88,0.141161,je 34 | 1,4.560883,je 35 | 2,2.162097,je 36 | 4,1.115913,je 37 | 6,0.766508,je 38 | 10,0.474896,je 39 | 16,0.325934,je 40 | 20,0.266807,je 41 | 24,0.359056,je 42 | 32,0.272744,je 43 | 40,0.223240,je 44 | 48,0.189915,je 45 | 62,0.144423,je 46 | 72,0.124377,je 47 | 80,0.119888,je 48 | 84,0.144577,je 49 | 88,0.149110,je 50 | -------------------------------------------------------------------------------- /data/shbench/shbench_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,3.242031,lr 3 | 2,1.698860,lr 4 | 4,0.900833,lr 5 | 6,0.646429,lr 6 | 10,0.462922,lr 7 | 16,0.366658,lr 8 | 20,0.321365,lr 9 | 24,0.383382,lr 10 | 32,0.288479,lr 11 | 40,0.290379,lr 12 | 48,0.359998,lr 13 | 62,0.328339,lr 14 | 72,0.275497,lr 15 | 80,0.422180,lr 16 | 84,0.314267,lr 17 | 88,0.366445,lr 18 | 1,3.234781,lr 19 | 2,1.796384,lr 20 | 4,1.285530,lr 21 | 6,0.672665,lr 22 | 10,0.485219,lr 23 | 16,0.353913,lr 24 | 20,0.341501,lr 25 | 24,0.399348,lr 26 | 32,0.314752,lr 27 | 40,0.452345,lr 28 | 48,0.385456,lr 29 | 62,0.349135,lr 30 | 72,0.290495,lr 31 | 80,0.307238,lr 32 | 84,0.321080,lr 33 | 88,0.371965,lr 34 | 1,4.631660,lr 35 | 2,1.655799,lr 36 | 4,0.895240,lr 37 | 6,0.646474,lr 38 | 10,0.466353,lr 39 | 16,0.344534,lr 40 | 20,0.325368,lr 41 | 24,0.402789,lr 42 | 32,0.316588,lr 43 | 40,0.256637,lr 44 | 48,0.363031,lr 45 | 62,0.331532,lr 46 | 72,0.269113,lr 47 | 80,0.361714,lr 48 | 84,0.304120,lr 49 | 88,0.334577,lr 50 | -------------------------------------------------------------------------------- /data/shbench/shbench_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,61.708392,mak 3 | 2,9.112862,mak 4 | 4,5.198610,mak 5 | 6,5.255353,mak 6 | 10,3.295075,mak 7 | 16,3.030507,mak 8 | 20,2.999607,mak 9 | 24,3.068475,mak 10 | 32,2.963218,mak 11 | 40,2.918710,mak 12 | 48,4.524371,mak 13 | 62,5.551893,mak 14 | 72,5.717011,mak 15 | 80,5.566220,mak 16 | 84,5.791597,mak 17 | 88,5.688654,mak 18 | 1,60.530502,mak 19 | 2,8.724464,mak 20 | 4,5.060090,mak 21 | 6,4.990901,mak 22 | 10,3.285251,mak 23 | 16,3.027592,mak 24 | 20,3.000330,mak 25 | 24,3.078483,mak 26 | 32,2.980049,mak 27 | 40,2.925825,mak 28 | 48,4.529942,mak 29 | 62,5.443720,mak 30 | 72,5.718722,mak 31 | 80,5.642813,mak 32 | 84,5.794296,mak 33 | 88,5.700366,mak 34 | 1,60.526030,mak 35 | 2,8.718297,mak 36 | 4,5.140102,mak 37 | 6,4.909312,mak 38 | 10,3.301055,mak 39 | 16,3.034849,mak 40 | 20,3.015050,mak 41 | 24,3.065314,mak 42 | 32,2.967509,mak 43 | 40,2.952689,mak 44 | 48,4.530778,mak 45 | 62,5.509046,mak 46 | 72,5.755090,mak 47 | 80,5.567338,mak 48 | 84,5.818408,mak 49 | 88,5.661381,mak 50 | -------------------------------------------------------------------------------- /data/shbench/shbench_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,205.872525,pmdk 3 | 2,109.544456,pmdk 4 | 4,60.046039,pmdk 5 | 6,42.450096,pmdk 6 | 10,27.741035,pmdk 7 | 16,19.920958,pmdk 8 | 20,16.784158,pmdk 9 | 24,17.302453,pmdk 10 | 32,14.087757,pmdk 11 | 40,11.716975,pmdk 12 | 48,9.376230,pmdk 13 | 62,9.200950,pmdk 14 | 72,9.262565,pmdk 15 | 80,9.433835,pmdk 16 | 84,14.281770,pmdk 17 | 88,14.830841,pmdk 18 | 1,205.989905,pmdk 19 | 2,109.242783,pmdk 20 | 4,59.855535,pmdk 21 | 6,42.650889,pmdk 22 | 10,27.787378,pmdk 23 | 16,19.942421,pmdk 24 | 20,16.850763,pmdk 25 | 24,17.301369,pmdk 26 | 32,14.172604,pmdk 27 | 40,11.610558,pmdk 28 | 48,9.267043,pmdk 29 | 62,9.215462,pmdk 30 | 72,9.426748,pmdk 31 | 80,9.201879,pmdk 32 | 84,14.891549,pmdk 33 | 88,15.057632,pmdk 34 | 1,207.358836,pmdk 35 | 2,110.143554,pmdk 36 | 4,59.815990,pmdk 37 | 6,42.705537,pmdk 38 | 10,27.774221,pmdk 39 | 16,19.613262,pmdk 40 | 20,16.775649,pmdk 41 | 24,17.160578,pmdk 42 | 32,14.428594,pmdk 43 | 40,11.585251,pmdk 44 | 48,9.095758,pmdk 45 | 62,9.279501,pmdk 46 | 72,9.487063,pmdk 47 | 80,9.990983,pmdk 48 | 84,15.043636,pmdk 49 | 88,14.394896,pmdk 50 | -------------------------------------------------------------------------------- /data/shbench/shbench_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,3.778109,r 3 | 2,1.873760,r 4 | 4,1.004286,r 5 | 6,0.714074,r 6 | 10,0.507760,r 7 | 16,0.366685,r 8 | 20,0.345524,r 9 | 24,0.413803,r 10 | 32,0.349721,r 11 | 40,0.304471,r 12 | 48,0.382577,r 13 | 62,0.367013,r 14 | 72,0.317523,r 15 | 80,0.305748,r 16 | 84,0.345590,r 17 | 88,0.371361,r 18 | 1,3.668626,r 19 | 2,1.885256,r 20 | 4,1.004428,r 21 | 6,0.714919,r 22 | 10,0.511601,r 23 | 16,0.366401,r 24 | 20,0.353060,r 25 | 24,0.406505,r 26 | 32,0.335504,r 27 | 40,0.413185,r 28 | 48,0.382297,r 29 | 62,0.347478,r 30 | 72,0.311411,r 31 | 80,0.304756,r 32 | 84,0.365044,r 33 | 88,0.381757,r 34 | 1,3.687009,r 35 | 2,1.877545,r 36 | 4,1.006823,r 37 | 6,0.712433,r 38 | 10,0.499202,r 39 | 16,0.504233,r 40 | 20,0.336989,r 41 | 24,0.423590,r 42 | 32,0.323670,r 43 | 40,0.320563,r 44 | 48,0.377251,r 45 | 62,0.359951,r 46 | 72,0.312717,r 47 | 80,0.301106,r 48 | 84,0.325000,r 49 | 88,0.368446,r 50 | -------------------------------------------------------------------------------- /data/shbench_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/shbench_linchart.pdf -------------------------------------------------------------------------------- /data/threadtest/threadtest_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,38.473719,je 3 | 2,18.754855,je 4 | 4,9.573292,je 5 | 6,6.498209,je 6 | 10,4.172624,je 7 | 16,3.003869,je 8 | 20,2.617600,je 9 | 24,3.619814,je 10 | 32,2.912712,je 11 | 40,2.584965,je 12 | 48,2.129889,je 13 | 62,1.649173,je 14 | 72,1.401590,je 15 | 80,1.265256,je 16 | 84,1.630017,je 17 | 88,1.522601,je 18 | 1,38.398419,je 19 | 2,18.742334,je 20 | 4,9.589446,je 21 | 6,6.502336,je 22 | 10,4.181868,je 23 | 16,3.005440,je 24 | 20,2.613512,je 25 | 24,3.609241,je 26 | 32,2.916351,je 27 | 40,2.599271,je 28 | 48,2.129867,je 29 | 62,1.652123,je 30 | 72,1.401829,je 31 | 80,1.261544,je 32 | 84,1.636006,je 33 | 88,1.525993,je 34 | 1,38.390161,je 35 | 2,18.758133,je 36 | 4,9.576248,je 37 | 6,6.751162,je 38 | 10,4.213563,je 39 | 16,3.031426,je 40 | 20,2.620176,je 41 | 24,3.601785,je 42 | 32,2.929116,je 43 | 40,2.591444,je 44 | 48,2.138222,je 45 | 62,1.650031,je 46 | 72,1.403613,je 47 | 80,1.258560,je 48 | 84,1.630423,je 49 | 88,1.527612,je 50 | -------------------------------------------------------------------------------- /data/threadtest/threadtest_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,28.501136,lr 3 | 2,14.220589,lr 4 | 4,7.550657,lr 5 | 6,5.269225,lr 6 | 10,3.527819,lr 7 | 16,2.919154,lr 8 | 20,2.621272,lr 9 | 24,3.274218,lr 10 | 32,2.784519,lr 11 | 40,2.407920,lr 12 | 48,4.000700,lr 13 | 62,4.567865,lr 14 | 72,4.766468,lr 15 | 80,4.958728,lr 16 | 84,5.336042,lr 17 | 88,5.162663,lr 18 | 1,27.925235,lr 19 | 2,14.159733,lr 20 | 4,7.540282,lr 21 | 6,5.263246,lr 22 | 10,3.542419,lr 23 | 16,2.900531,lr 24 | 20,2.655121,lr 25 | 24,3.271542,lr 26 | 32,2.812853,lr 27 | 40,2.398042,lr 28 | 48,4.007468,lr 29 | 62,4.438683,lr 30 | 72,4.623458,lr 31 | 80,4.736909,lr 32 | 84,5.397758,lr 33 | 88,5.048593,lr 34 | 1,27.916684,lr 35 | 2,14.176988,lr 36 | 4,7.574406,lr 37 | 6,5.268253,lr 38 | 10,3.532569,lr 39 | 16,2.919650,lr 40 | 20,2.633117,lr 41 | 24,3.301869,lr 42 | 32,2.805594,lr 43 | 40,2.408298,lr 44 | 48,4.001653,lr 45 | 62,4.369836,lr 46 | 72,4.566009,lr 47 | 80,5.506528,lr 48 | 84,5.857326,lr 49 | 88,4.786546,lr 50 | -------------------------------------------------------------------------------- /data/threadtest/threadtest_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,298.489466,mak 3 | 2,50.475387,mak 4 | 4,46.973996,mak 5 | 6,45.072892,mak 6 | 10,40.285037,mak 7 | 16,46.971009,mak 8 | 20,54.466625,mak 9 | 24,48.462660,mak 10 | 32,48.672548,mak 11 | 40,52.315744,mak 12 | 48,70.811344,mak 13 | 62,93.604225,mak 14 | 72,96.592585,mak 15 | 80,97.550882,mak 16 | 84,94.981408,mak 17 | 88,79.058926,mak 18 | 1,297.947329,mak 19 | 2,50.445302,mak 20 | 4,47.461735,mak 21 | 6,45.603478,mak 22 | 10,40.331846,mak 23 | 16,46.996118,mak 24 | 20,54.579320,mak 25 | 24,48.822826,mak 26 | 32,48.420888,mak 27 | 40,52.470606,mak 28 | 48,72.163470,mak 29 | 62,94.356149,mak 30 | 72,96.758206,mak 31 | 80,96.167814,mak 32 | 84,96.005624,mak 33 | 88,79.063659,mak 34 | 1,297.912140,mak 35 | 2,51.193792,mak 36 | 4,47.262959,mak 37 | 6,45.412458,mak 38 | 10,40.192694,mak 39 | 16,46.807945,mak 40 | 20,54.530985,mak 41 | 24,49.021625,mak 42 | 32,49.299876,mak 43 | 40,51.838073,mak 44 | 48,71.373146,mak 45 | 62,93.525091,mak 46 | 72,99.374259,mak 47 | 80,96.711743,mak 48 | 84,95.103948,mak 49 | 88,80.238233,mak 50 | -------------------------------------------------------------------------------- /data/threadtest/threadtest_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,1696.362083,pmdk 3 | 2,947.314824,pmdk 4 | 4,558.516606,pmdk 5 | 6,395.009389,pmdk 6 | 10,261.122093,pmdk 7 | 16,188.217858,pmdk 8 | 20,145.656433,pmdk 9 | 24,157.525866,pmdk 10 | 32,135.149054,pmdk 11 | 40,113.287280,pmdk 12 | 48,121.556589,pmdk 13 | 62,89.982074,pmdk 14 | 72,82.351553,pmdk 15 | 80,83.598495,pmdk 16 | 84,94.146778,pmdk 17 | 88,106.093883,pmdk 18 | 1,1687.060696,pmdk 19 | 2,956.150127,pmdk 20 | 4,560.825695,pmdk 21 | 6,397.288996,pmdk 22 | 10,256.649752,pmdk 23 | 16,173.869762,pmdk 24 | 20,149.852697,pmdk 25 | 24,164.371417,pmdk 26 | 32,137.160260,pmdk 27 | 40,127.498655,pmdk 28 | 48,112.826166,pmdk 29 | 62,88.732003,pmdk 30 | 72,76.357881,pmdk 31 | 80,78.760552,pmdk 32 | 84,107.466773,pmdk 33 | 88,109.900041,pmdk 34 | 1,1690.666229,pmdk 35 | 2,964.000551,pmdk 36 | 4,561.545524,pmdk 37 | 6,402.960799,pmdk 38 | 10,257.045598,pmdk 39 | 16,172.648438,pmdk 40 | 20,151.099388,pmdk 41 | 24,156.468171,pmdk 42 | 32,133.101440,pmdk 43 | 40,113.189351,pmdk 44 | 48,125.358621,pmdk 45 | 62,87.266278,pmdk 46 | 72,76.207274,pmdk 47 | 80,74.474944,pmdk 48 | 84,109.939584,pmdk 49 | 88,105.001153,pmdk 50 | -------------------------------------------------------------------------------- /data/threadtest/threadtest_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,28.961677,r 3 | 2,14.469014,r 4 | 4,7.633362,r 5 | 6,5.281409,r 6 | 10,3.494047,r 7 | 16,2.654988,r 8 | 20,2.486464,r 9 | 24,3.136073,r 10 | 32,2.670772,r 11 | 40,2.294735,r 12 | 48,3.905869,r 13 | 62,4.357339,r 14 | 72,4.990623,r 15 | 80,4.995838,r 16 | 84,5.279173,r 17 | 88,4.806408,r 18 | 1,28.557086,r 19 | 2,14.425104,r 20 | 4,7.613529,r 21 | 6,5.275220,r 22 | 10,3.489400,r 23 | 16,2.657858,r 24 | 20,2.501780,r 25 | 24,3.132200,r 26 | 32,2.660687,r 27 | 40,2.317828,r 28 | 48,3.928152,r 29 | 62,4.281570,r 30 | 72,4.977032,r 31 | 80,4.787921,r 32 | 84,5.568433,r 33 | 88,4.858017,r 34 | 1,28.549600,r 35 | 2,14.437553,r 36 | 4,7.617804,r 37 | 6,5.278428,r 38 | 10,3.490988,r 39 | 16,2.663220,r 40 | 20,2.486958,r 41 | 24,3.146088,r 42 | 32,2.685093,r 43 | 40,2.306277,r 44 | 48,3.944328,r 45 | 62,4.444387,r 46 | 72,4.413219,r 47 | 80,5.285260,r 48 | 84,5.470575,r 49 | 88,5.072380,r 50 | -------------------------------------------------------------------------------- /data/threadtest_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/threadtest_linchart.pdf -------------------------------------------------------------------------------- /data/uncached+dax/larson/larson_je.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,22740999,je 3 | 2,31924211,je 4 | 4,50353201,je 5 | 6,87726259,je 6 | 10,125025740,je 7 | 16,174583659,je 8 | 20,213142935,je 9 | 24,223469360,je 10 | 32,253035254,je 11 | 40,283174973,je 12 | 48,373766564,je 13 | 60,466323634,je 14 | 72,510634877,je 15 | 80,524934435,je 16 | 84,532964701,je 17 | 88,538592445,je 18 | 1,22744759,je 19 | 2,30730747,je 20 | 4,51172334,je 21 | 6,81033066,je 22 | 10,127576426,je 23 | 16,180383350,je 24 | 20,215188293,je 25 | 24,226967840,je 26 | 32,249164583,je 27 | 40,282997291,je 28 | 48,362169654,je 29 | 60,465853668,je 30 | 72,511918964,je 31 | 80,529279541,je 32 | 84,533630139,je 33 | 88,531489697,je 34 | 1,22742635,je 35 | 2,26275090,je 36 | 4,53262050,je 37 | 6,85654691,je 38 | 10,133427405,je 39 | 16,181156755,je 40 | 20,211791785,je 41 | 24,225695749,je 42 | 32,249273838,je 43 | 40,279474067,je 44 | 48,369642144,je 45 | 60,439066470,je 46 | 72,514488379,je 47 | 80,529068982,je 48 | 84,532191243,je 49 | 88,533960012,je 50 | -------------------------------------------------------------------------------- /data/uncached+dax/larson/larson_lr.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,26786040,lr 3 | 2,49417682,lr 4 | 4,63364903,lr 5 | 6,91047286,lr 6 | 10,152252686,lr 7 | 16,207414293,lr 8 | 20,244916795,lr 9 | 24,259769510,lr 10 | 32,286416360,lr 11 | 40,312023143,lr 12 | 48,414296020,lr 13 | 60,524405932,lr 14 | 72,550944762,lr 15 | 80,558886794,lr 16 | 84,564463359,lr 17 | 88,572485940,lr 18 | 1,26829761,lr 19 | 2,36976558,lr 20 | 4,74712153,lr 21 | 6,92524221,lr 22 | 10,147583489,lr 23 | 16,195096411,lr 24 | 20,239236313,lr 25 | 24,254989019,lr 26 | 32,282368056,lr 27 | 40,320281266,lr 28 | 48,414705317,lr 29 | 60,515406632,lr 30 | 72,553553560,lr 31 | 80,563943352,lr 32 | 84,568762076,lr 33 | 88,570196703,lr 34 | 1,26810798,lr 35 | 2,49337806,lr 36 | 4,59743005,lr 37 | 6,99580764,lr 38 | 10,154537746,lr 39 | 16,202645463,lr 40 | 20,261434309,lr 41 | 24,256337007,lr 42 | 32,284174044,lr 43 | 40,314055095,lr 44 | 48,411308528,lr 45 | 60,524646161,lr 46 | 72,548784066,lr 47 | 80,566448205,lr 48 | 84,565608352,lr 49 | 88,576669831,lr 50 | -------------------------------------------------------------------------------- /data/uncached+dax/larson/larson_mak.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,13389787,mak 3 | 2,23245972,mak 4 | 4,39988255,mak 5 | 6,67275803,mak 6 | 10,94532874,mak 7 | 16,133179943,mak 8 | 20,158395057,mak 9 | 24,166503349,mak 10 | 32,183316528,mak 11 | 40,204425621,mak 12 | 48,269704149,mak 13 | 60,344586515,mak 14 | 72,376127191,mak 15 | 80,391672793,mak 16 | 84,394942105,mak 17 | 88,398491798,mak 18 | 1,13412000,mak 19 | 2,24754712,mak 20 | 4,49208953,mak 21 | 6,70487641,mak 22 | 10,95000776,mak 23 | 16,132819650,mak 24 | 20,162276894,mak 25 | 24,163800021,mak 26 | 32,183281481,mak 27 | 40,200252381,mak 28 | 48,269651252,mak 29 | 60,346061290,mak 30 | 72,376629408,mak 31 | 80,391452065,mak 32 | 84,395257963,mak 33 | 88,397810455,mak 34 | 1,13420539,mak 35 | 2,24526380,mak 36 | 4,40867011,mak 37 | 6,59402482,mak 38 | 10,98554563,mak 39 | 16,131618225,mak 40 | 20,158206137,mak 41 | 24,165126184,mak 42 | 32,183224966,mak 43 | 40,186117791,mak 44 | 48,268211443,mak 45 | 60,350144819,mak 46 | 72,374772557,mak 47 | 80,388875301,mak 48 | 84,395492725,mak 49 | 88,398357173,mak 50 | -------------------------------------------------------------------------------- /data/uncached+dax/larson/larson_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,559584,pmdk 3 | 2,950442,pmdk 4 | 4,1812608,pmdk 5 | 6,2779713,pmdk 6 | 10,4422126,pmdk 7 | 16,6371665,pmdk 8 | 20,7748872,pmdk 9 | 24,8470907,pmdk 10 | 32,9679951,pmdk 11 | 40,10679273,pmdk 12 | 48,11394284,pmdk 13 | 60,10002915,pmdk 14 | 72,11808898,pmdk 15 | 80,11930893,pmdk 16 | 84,11532257,pmdk 17 | 88,10072175,pmdk 18 | 1,557008,pmdk 19 | 2,957807,pmdk 20 | 4,1784366,pmdk 21 | 6,2678252,pmdk 22 | 10,4344725,pmdk 23 | 16,6543821,pmdk 24 | 20,7932451,pmdk 25 | 24,8492909,pmdk 26 | 32,9112865,pmdk 27 | 40,10754039,pmdk 28 | 48,11099371,pmdk 29 | 60,12471031,pmdk 30 | 72,12269870,pmdk 31 | 80,11239978,pmdk 32 | 84,11063138,pmdk 33 | 88,10673243,pmdk 34 | 1,558427,pmdk 35 | 2,942156,pmdk 36 | 4,1785692,pmdk 37 | 6,2822199,pmdk 38 | 10,4424373,pmdk 39 | 16,6357777,pmdk 40 | 20,7625080,pmdk 41 | 24,8389706,pmdk 42 | 32,9901689,pmdk 43 | 40,10763129,pmdk 44 | 48,10739791,pmdk 45 | 60,10988228,pmdk 46 | 72,11337164,pmdk 47 | 80,11734404,pmdk 48 | 84,11316778,pmdk 49 | 88,10869353,pmdk 50 | -------------------------------------------------------------------------------- /data/uncached+dax/larson/larson_r.csv: -------------------------------------------------------------------------------- 1 | thread,ops,allocator 2 | 1,20442916,r 3 | 2,34121538,r 4 | 4,61507803,r 5 | 6,82726554,r 6 | 10,127746373,r 7 | 16,170367660,r 8 | 20,206372594,r 9 | 24,218104731,r 10 | 32,243546013,r 11 | 40,269038092,r 12 | 48,357279840,r 13 | 60,452237107,r 14 | 72,489860731,r 15 | 80,513189755,r 16 | 84,518536789,r 17 | 88,516804770,r 18 | 1,20117268,r 19 | 2,38717012,r 20 | 4,59264759,r 21 | 6,88390451,r 22 | 10,126572392,r 23 | 16,174669538,r 24 | 20,203729983,r 25 | 24,217948223,r 26 | 32,241035396,r 27 | 40,266309605,r 28 | 48,355556712,r 29 | 60,449438849,r 30 | 72,487940405,r 31 | 80,507215924,r 32 | 84,516968561,r 33 | 88,520436551,r 34 | 1,20403555,r 35 | 2,38744141,r 36 | 4,56833979,r 37 | 6,74575485,r 38 | 10,128264782,r 39 | 16,171422099,r 40 | 20,204267853,r 41 | 24,215682365,r 42 | 32,240381947,r 43 | 40,268280941,r 44 | 48,359123135,r 45 | 60,448483023,r 46 | 72,488210272,r 47 | 80,509752921,r 48 | 84,515159477,r 49 | 88,519267204,r 50 | -------------------------------------------------------------------------------- /data/uncached+dax/larson_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/uncached+dax/larson_linchart.pdf -------------------------------------------------------------------------------- /data/uncached+dax/prod-con/prod-con_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,2.086780,je 3 | 4,1.336798,je 4 | 6,0.924752,je 5 | 10,0.574552,je 6 | 16,0.411121,je 7 | 20,0.336518,je 8 | 24,0.319735,je 9 | 32,0.258214,je 10 | 40,0.214739,je 11 | 48,0.180938,je 12 | 60,0.149815,je 13 | 72,0.129166,je 14 | 80,0.121992,je 15 | 84,0.187837,je 16 | 88,0.202448,je 17 | 2,2.819049,je 18 | 4,1.341156,je 19 | 6,0.915617,je 20 | 10,0.554327,je 21 | 16,0.384302,je 22 | 20,0.328240,je 23 | 24,0.327208,je 24 | 32,0.255645,je 25 | 40,0.212671,je 26 | 48,0.181408,je 27 | 60,0.149664,je 28 | 72,0.131389,je 29 | 80,0.117689,je 30 | 84,0.174529,je 31 | 88,0.206952,je 32 | 2,2.646120,je 33 | 4,1.343785,je 34 | 6,0.956780,je 35 | 10,0.569461,je 36 | 16,0.401506,je 37 | 20,0.327957,je 38 | 24,0.316965,je 39 | 32,0.254267,je 40 | 40,0.215155,je 41 | 48,0.180278,je 42 | 60,0.149194,je 43 | 72,0.134525,je 44 | 80,0.118743,je 45 | 84,0.166957,je 46 | 88,0.201136,je 47 | -------------------------------------------------------------------------------- /data/uncached+dax/prod-con/prod-con_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.314715,lr 3 | 4,1.684039,lr 4 | 6,1.134138,lr 5 | 10,0.719320,lr 6 | 16,0.496439,lr 7 | 20,0.420021,lr 8 | 24,0.397168,lr 9 | 32,0.384758,lr 10 | 40,0.475686,lr 11 | 48,0.672842,lr 12 | 60,0.799500,lr 13 | 72,0.876531,lr 14 | 80,0.892769,lr 15 | 84,2.120980,lr 16 | 88,2.570750,lr 17 | 2,3.284224,lr 18 | 4,1.712080,lr 19 | 6,1.141495,lr 20 | 10,0.722706,lr 21 | 16,0.490553,lr 22 | 20,0.421080,lr 23 | 24,0.399232,lr 24 | 32,0.392421,lr 25 | 40,0.467197,lr 26 | 48,0.675063,lr 27 | 60,0.814521,lr 28 | 72,0.879707,lr 29 | 80,0.930390,lr 30 | 84,1.607436,lr 31 | 88,2.639021,lr 32 | 2,3.267199,lr 33 | 4,1.683502,lr 34 | 6,1.160317,lr 35 | 10,0.725652,lr 36 | 16,0.486937,lr 37 | 20,0.417381,lr 38 | 24,0.403090,lr 39 | 32,0.387457,lr 40 | 40,0.460827,lr 41 | 48,0.658828,lr 42 | 60,0.835402,lr 43 | 72,0.884284,lr 44 | 80,0.914000,lr 45 | 84,1.820171,lr 46 | 88,2.629396,lr 47 | -------------------------------------------------------------------------------- /data/uncached+dax/prod-con/prod-con_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.850089,mak 3 | 4,2.017898,mak 4 | 6,1.400136,mak 5 | 10,1.151117,mak 6 | 16,1.002099,mak 7 | 20,1.008153,mak 8 | 24,1.016544,mak 9 | 32,0.985483,mak 10 | 40,1.032279,mak 11 | 48,1.207816,mak 12 | 60,1.421310,mak 13 | 72,1.537748,mak 14 | 80,1.592755,mak 15 | 84,1.593217,mak 16 | 88,1.611861,mak 17 | 2,3.990569,mak 18 | 4,2.063669,mak 19 | 6,1.397988,mak 20 | 10,1.123788,mak 21 | 16,1.028568,mak 22 | 20,0.997998,mak 23 | 24,1.029083,mak 24 | 32,0.971110,mak 25 | 40,1.050422,mak 26 | 48,1.217843,mak 27 | 60,1.387317,mak 28 | 72,1.500165,mak 29 | 80,1.590613,mak 30 | 84,1.576291,mak 31 | 88,1.595247,mak 32 | 2,3.826183,mak 33 | 4,2.095997,mak 34 | 6,1.385849,mak 35 | 10,1.134731,mak 36 | 16,1.013213,mak 37 | 20,1.009565,mak 38 | 24,0.993800,mak 39 | 32,0.992698,mak 40 | 40,1.030651,mak 41 | 48,1.208631,mak 42 | 60,1.403063,mak 43 | 72,1.517238,mak 44 | 80,1.584054,mak 45 | 84,1.582598,mak 46 | 88,1.565993,mak 47 | -------------------------------------------------------------------------------- /data/uncached+dax/prod-con/prod-con_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,40.618701,pmdk 3 | 4,19.970791,pmdk 4 | 6,14.001617,pmdk 5 | 10,9.103994,pmdk 6 | 16,5.759336,pmdk 7 | 20,4.503277,pmdk 8 | 24,6.036415,pmdk 9 | 32,4.728986,pmdk 10 | 40,4.123183,pmdk 11 | 48,3.261075,pmdk 12 | 60,2.530053,pmdk 13 | 72,2.553692,pmdk 14 | 80,2.285728,pmdk 15 | 84,2.206840,pmdk 16 | 88,2.143866,pmdk 17 | 2,41.157993,pmdk 18 | 4,20.255269,pmdk 19 | 6,14.256381,pmdk 20 | 10,9.308582,pmdk 21 | 16,5.946386,pmdk 22 | 20,4.466021,pmdk 23 | 24,5.901418,pmdk 24 | 32,4.691416,pmdk 25 | 40,3.944556,pmdk 26 | 48,2.999010,pmdk 27 | 60,2.837991,pmdk 28 | 72,2.418613,pmdk 29 | 80,2.246596,pmdk 30 | 84,2.414951,pmdk 31 | 88,2.266749,pmdk 32 | 2,35.299531,pmdk 33 | 4,21.127305,pmdk 34 | 6,13.946836,pmdk 35 | 10,9.134121,pmdk 36 | 16,5.969997,pmdk 37 | 20,5.064493,pmdk 38 | 24,6.139980,pmdk 39 | 32,4.704111,pmdk 40 | 40,3.996820,pmdk 41 | 48,3.026522,pmdk 42 | 60,2.447619,pmdk 43 | 72,2.443909,pmdk 44 | 80,2.401038,pmdk 45 | 84,2.163681,pmdk 46 | 88,2.187029,pmdk 47 | -------------------------------------------------------------------------------- /data/uncached+dax/prod-con/prod-con_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 2,3.962584,r 3 | 4,2.093299,r 4 | 6,1.383910,r 5 | 10,0.891570,r 6 | 16,0.607554,r 7 | 20,0.507395,r 8 | 24,0.542831,r 9 | 32,0.421314,r 10 | 40,0.352503,r 11 | 48,0.300736,r 12 | 60,0.258073,r 13 | 72,0.234572,r 14 | 80,0.217515,r 15 | 84,0.326956,r 16 | 88,0.339359,r 17 | 2,3.903399,r 18 | 4,2.035253,r 19 | 6,1.385060,r 20 | 10,0.873487,r 21 | 16,0.606814,r 22 | 20,0.503974,r 23 | 24,0.537859,r 24 | 32,0.422330,r 25 | 40,0.348965,r 26 | 48,0.302580,r 27 | 60,0.265363,r 28 | 72,0.231354,r 29 | 80,0.222234,r 30 | 84,0.323869,r 31 | 88,0.360113,r 32 | 2,3.960238,r 33 | 4,2.055151,r 34 | 6,1.397099,r 35 | 10,0.871580,r 36 | 16,0.601290,r 37 | 20,0.512589,r 38 | 24,0.535998,r 39 | 32,0.422304,r 40 | 40,0.356355,r 41 | 48,0.316195,r 42 | 60,0.248526,r 43 | 72,0.226663,r 44 | 80,0.215880,r 45 | 84,0.318095,r 46 | 88,0.377379,r 47 | -------------------------------------------------------------------------------- /data/uncached+dax/prod-con_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/uncached+dax/prod-con_linchart.pdf -------------------------------------------------------------------------------- /data/uncached+dax/shbench/shbench_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,28.557994,je 3 | 2,13.608287,je 4 | 4,7.028729,je 5 | 6,4.808097,je 6 | 10,2.958687,je 7 | 16,2.075327,je 8 | 20,1.757223,je 9 | 24,2.307808,je 10 | 32,1.752882,je 11 | 40,1.504987,je 12 | 48,1.304641,je 13 | 60,1.027228,je 14 | 72,0.853472,je 15 | 80,0.734251,je 16 | 84,1.015210,je 17 | 88,1.008858,je 18 | 1,28.514680,je 19 | 2,13.592654,je 20 | 4,7.029677,je 21 | 6,4.785195,je 22 | 10,2.963538,je 23 | 16,2.048890,je 24 | 20,1.750391,je 25 | 24,2.322762,je 26 | 32,1.760359,je 27 | 40,1.503242,je 28 | 48,1.302685,je 29 | 60,1.027092,je 30 | 72,0.856452,je 31 | 80,0.729260,je 32 | 84,1.120088,je 33 | 88,0.994238,je 34 | 1,28.522198,je 35 | 2,13.630732,je 36 | 4,7.118647,je 37 | 6,4.773085,je 38 | 10,2.974010,je 39 | 16,2.070398,je 40 | 20,1.759696,je 41 | 24,2.322431,je 42 | 32,1.776425,je 43 | 40,1.512197,je 44 | 48,1.304776,je 45 | 60,1.036314,je 46 | 72,0.847728,je 47 | 80,0.731736,je 48 | 84,1.013824,je 49 | 88,0.980031,je 50 | -------------------------------------------------------------------------------- /data/uncached+dax/shbench/shbench_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,8.296798,lr 3 | 2,3.774358,lr 4 | 4,1.896884,lr 5 | 6,1.315760,lr 6 | 10,0.761194,lr 7 | 16,0.541158,lr 8 | 20,0.477770,lr 9 | 24,0.628087,lr 10 | 32,0.514459,lr 11 | 40,0.513314,lr 12 | 48,0.578439,lr 13 | 60,0.962935,lr 14 | 72,0.696874,lr 15 | 80,0.967473,lr 16 | 84,2.345138,lr 17 | 88,2.991148,lr 18 | 1,8.457774,lr 19 | 2,3.769204,lr 20 | 4,1.898501,lr 21 | 6,1.316293,lr 22 | 10,0.762523,lr 23 | 16,0.536615,lr 24 | 20,0.477102,lr 25 | 24,0.628476,lr 26 | 32,0.515047,lr 27 | 40,0.511877,lr 28 | 48,0.584036,lr 29 | 60,0.994805,lr 30 | 72,0.697529,lr 31 | 80,1.093346,lr 32 | 84,2.093842,lr 33 | 88,3.823106,lr 34 | 1,8.433010,lr 35 | 2,3.774620,lr 36 | 4,1.901752,lr 37 | 6,1.316944,lr 38 | 10,0.763588,lr 39 | 16,0.536429,lr 40 | 20,0.477364,lr 41 | 24,0.628920,lr 42 | 32,0.516435,lr 43 | 40,0.507637,lr 44 | 48,0.583478,lr 45 | 60,0.995236,lr 46 | 72,0.697722,lr 47 | 80,0.963691,lr 48 | 84,2.049373,lr 49 | 88,2.532658,lr 50 | -------------------------------------------------------------------------------- /data/uncached+dax/shbench/shbench_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,93.037561,mak 3 | 2,37.743733,mak 4 | 4,22.147651,mak 5 | 6,15.571708,mak 6 | 10,13.090428,mak 7 | 16,10.545399,mak 8 | 20,10.286582,mak 9 | 24,10.161089,mak 10 | 32,9.233441,mak 11 | 40,9.783484,mak 12 | 48,12.547409,mak 13 | 60,14.843570,mak 14 | 72,15.021780,mak 15 | 80,19.571745,mak 16 | 84,15.162424,mak 17 | 88,13.547830,mak 18 | 1,101.264965,mak 19 | 2,38.445616,mak 20 | 4,22.182188,mak 21 | 6,15.357281,mak 22 | 10,13.034316,mak 23 | 16,10.492108,mak 24 | 20,10.403353,mak 25 | 24,10.164840,mak 26 | 32,9.131421,mak 27 | 40,9.693137,mak 28 | 48,12.590729,mak 29 | 60,14.772319,mak 30 | 72,14.832652,mak 31 | 80,19.165043,mak 32 | 84,15.156009,mak 33 | 88,13.401117,mak 34 | 1,103.494063,mak 35 | 2,38.742118,mak 36 | 4,22.196336,mak 37 | 6,15.407877,mak 38 | 10,13.057706,mak 39 | 16,10.570320,mak 40 | 20,10.351898,mak 41 | 24,10.223419,mak 42 | 32,9.187544,mak 43 | 40,9.840917,mak 44 | 48,12.461281,mak 45 | 60,14.800823,mak 46 | 72,14.835930,mak 47 | 80,19.400136,mak 48 | 84,15.216254,mak 49 | 88,13.659604,mak 50 | -------------------------------------------------------------------------------- /data/uncached+dax/shbench/shbench_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,1470.456388,pmdk 3 | 2,845.857323,pmdk 4 | 4,487.032474,pmdk 5 | 6,342.848543,pmdk 6 | 10,,pmdk 7 | 16,,pmdk 8 | 20,,pmdk 9 | 24,167.798958,pmdk 10 | 32,,pmdk 11 | 40,,pmdk 12 | 48,174.937501,pmdk 13 | 60,,pmdk 14 | 72,187.351116,pmdk 15 | 80,,pmdk 16 | 84,,pmdk 17 | 88,203.661030,pmdk 18 | 1,1461.572942,pmdk 19 | 2,842.617154,pmdk 20 | 4,486.245751,pmdk 21 | 6,342.543874,pmdk 22 | 10,,pmdk 23 | 16,,pmdk 24 | 20,,pmdk 25 | 24,168.643951,pmdk 26 | 32,,pmdk 27 | 40,,pmdk 28 | 48,177.479561,pmdk 29 | 60,,pmdk 30 | 72,191.925638,pmdk 31 | 80,,pmdk 32 | 84,,pmdk 33 | 88,207.183359,pmdk 34 | 1,1457.024191,pmdk 35 | 2,835.354515,pmdk 36 | 4,485.818259,pmdk 37 | 6,341.798028,pmdk 38 | 10,,pmdk 39 | 16,,pmdk 40 | 20,,pmdk 41 | 24,169.564953,pmdk 42 | 32,,pmdk 43 | 40,,pmdk 44 | 48,175.024678,pmdk 45 | 60,,pmdk 46 | 72,189.289211,pmdk 47 | 80,,pmdk 48 | 84,,pmdk 49 | 88,206.090425,pmdk 50 | -------------------------------------------------------------------------------- /data/uncached+dax/shbench/shbench_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,21.070696,r 3 | 2,12.618756,r 4 | 4,7.973906,r 5 | 6,4.860944,r 6 | 10,4.122758,r 7 | 16,2.302349,r 8 | 20,2.220449,r 9 | 24,2.219174,r 10 | 32,1.794717,r 11 | 40,2.879593,r 12 | 48,1.962656,r 13 | 60,2.173667,r 14 | 72,2.127905,r 15 | 80,4.277967,r 16 | 84,3.322542,r 17 | 88,2.844471,r 18 | 1,27.685028,r 19 | 2,13.480545,r 20 | 4,8.001076,r 21 | 6,4.888659,r 22 | 10,4.093639,r 23 | 16,2.329569,r 24 | 20,2.256386,r 25 | 24,2.261419,r 26 | 32,1.785043,r 27 | 40,2.777134,r 28 | 48,1.971700,r 29 | 60,2.321846,r 30 | 72,2.363137,r 31 | 80,3.797616,r 32 | 84,2.903996,r 33 | 88,2.778925,r 34 | 1,27.470031,r 35 | 2,13.426131,r 36 | 4,7.969154,r 37 | 6,4.890701,r 38 | 10,4.192080,r 39 | 16,2.313723,r 40 | 20,2.226591,r 41 | 24,2.254389,r 42 | 32,1.783867,r 43 | 40,2.868890,r 44 | 48,1.984210,r 45 | 60,2.440815,r 46 | 72,2.258632,r 47 | 80,3.797577,r 48 | 84,3.155664,r 49 | 88,2.913814,r 50 | -------------------------------------------------------------------------------- /data/uncached+dax/shbench_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/uncached+dax/shbench_linchart.pdf -------------------------------------------------------------------------------- /data/uncached+dax/threadtest/threadtest_je.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,38.745094,je 3 | 2,18.840488,je 4 | 4,9.646516,je 5 | 6,6.549557,je 6 | 10,4.194552,je 7 | 16,3.105643,je 8 | 20,2.597296,je 9 | 24,3.582108,je 10 | 32,2.862805,je 11 | 40,2.583853,je 12 | 48,2.149911,je 13 | 60,1.694370,je 14 | 72,1.402568,je 15 | 80,1.253945,je 16 | 84,1.626990,je 17 | 88,1.519992,je 18 | 1,38.555217,je 19 | 2,18.823424,je 20 | 4,9.639470,je 21 | 6,6.549551,je 22 | 10,4.190215,je 23 | 16,3.224454,je 24 | 20,2.630367,je 25 | 24,3.588690,je 26 | 32,2.867520,je 27 | 40,2.575478,je 28 | 48,2.135531,je 29 | 60,1.716964,je 30 | 72,1.408782,je 31 | 80,1.265865,je 32 | 84,1.626521,je 33 | 88,1.523764,je 34 | 1,38.563432,je 35 | 2,18.858798,je 36 | 4,9.665349,je 37 | 6,6.553878,je 38 | 10,4.193122,je 39 | 16,3.108503,je 40 | 20,2.635120,je 41 | 24,3.579783,je 42 | 32,2.858967,je 43 | 40,2.580168,je 44 | 48,2.126695,je 45 | 60,1.706440,je 46 | 72,1.391887,je 47 | 80,1.254009,je 48 | 84,1.638623,je 49 | 88,1.527422,je 50 | -------------------------------------------------------------------------------- /data/uncached+dax/threadtest/threadtest_lr.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,33.141721,lr 3 | 2,16.376868,lr 4 | 4,6.175831,lr 5 | 6,4.243771,lr 6 | 10,2.806620,lr 7 | 16,2.266148,lr 8 | 20,2.094973,lr 9 | 24,2.341966,lr 10 | 32,2.023554,lr 11 | 40,1.793302,lr 12 | 48,6.353805,lr 13 | 60,10.086470,lr 14 | 72,11.580511,lr 15 | 80,14.301140,lr 16 | 84,13.223685,lr 17 | 88,10.681257,lr 18 | 1,32.838150,lr 19 | 2,15.636617,lr 20 | 4,6.211252,lr 21 | 6,4.248901,lr 22 | 10,2.784799,lr 23 | 16,2.247228,lr 24 | 20,2.095447,lr 25 | 24,2.330113,lr 26 | 32,2.028009,lr 27 | 40,1.806202,lr 28 | 48,6.353022,lr 29 | 60,10.007317,lr 30 | 72,12.446661,lr 31 | 80,12.575140,lr 32 | 84,12.821451,lr 33 | 88,9.257601,lr 34 | 1,32.802896,lr 35 | 2,15.107123,lr 36 | 4,6.153375,lr 37 | 6,4.236141,lr 38 | 10,2.794744,lr 39 | 16,2.261788,lr 40 | 20,2.082684,lr 41 | 24,2.341934,lr 42 | 32,2.029684,lr 43 | 40,1.814099,lr 44 | 48,6.444999,lr 45 | 60,10.012518,lr 46 | 72,12.727933,lr 47 | 80,11.771121,lr 48 | 84,10.974186,lr 49 | 88,9.967966,lr 50 | -------------------------------------------------------------------------------- /data/uncached+dax/threadtest/threadtest_mak.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,320.027267,mak 3 | 2,60.646263,mak 4 | 4,47.059344,mak 5 | 6,45.633941,mak 6 | 10,39.881547,mak 7 | 16,47.218146,mak 8 | 20,54.696146,mak 9 | 24,48.146901,mak 10 | 32,48.007553,mak 11 | 40,51.422572,mak 12 | 48,71.400170,mak 13 | 60,91.465897,mak 14 | 72,98.989597,mak 15 | 80,97.215824,mak 16 | 84,97.173121,mak 17 | 88,79.648570,mak 18 | 1,319.604281,mak 19 | 2,63.015466,mak 20 | 4,47.146187,mak 21 | 6,45.748615,mak 22 | 10,39.998514,mak 23 | 16,46.293460,mak 24 | 20,54.826536,mak 25 | 24,48.480542,mak 26 | 32,48.331482,mak 27 | 40,51.625693,mak 28 | 48,70.965284,mak 29 | 60,90.302535,mak 30 | 72,98.340636,mak 31 | 80,99.625048,mak 32 | 84,96.487466,mak 33 | 88,80.327306,mak 34 | 1,319.538058,mak 35 | 2,55.552946,mak 36 | 4,46.799178,mak 37 | 6,45.378184,mak 38 | 10,40.574831,mak 39 | 16,46.902303,mak 40 | 20,54.544823,mak 41 | 24,48.191332,mak 42 | 32,47.907037,mak 43 | 40,51.677446,mak 44 | 48,71.008329,mak 45 | 60,89.378457,mak 46 | 72,97.506235,mak 47 | 80,97.803742,mak 48 | 84,96.868524,mak 49 | 88,79.124015,mak 50 | -------------------------------------------------------------------------------- /data/uncached+dax/threadtest/threadtest_pmdk.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,1691.096834,pmdk 3 | 2,954.334689,pmdk 4 | 4,557.782857,pmdk 5 | 6,396.687022,pmdk 6 | 10,261.447336,pmdk 7 | 16,175.502574,pmdk 8 | 20,146.033734,pmdk 9 | 24,166.718163,pmdk 10 | 32,136.081144,pmdk 11 | 40,112.559920,pmdk 12 | 48,128.695063,pmdk 13 | 60,83.250199,pmdk 14 | 72,81.341276,pmdk 15 | 80,74.502421,pmdk 16 | 84,123.646041,pmdk 17 | 88,117.623047,pmdk 18 | 1,1689.089500,pmdk 19 | 2,940.396611,pmdk 20 | 4,561.447375,pmdk 21 | 6,399.871071,pmdk 22 | 10,257.265001,pmdk 23 | 16,172.020822,pmdk 24 | 20,155.596442,pmdk 25 | 24,159.563335,pmdk 26 | 32,133.762496,pmdk 27 | 40,113.880986,pmdk 28 | 48,119.692036,pmdk 29 | 60,95.776858,pmdk 30 | 72,83.095836,pmdk 31 | 80,78.480207,pmdk 32 | 84,133.625719,pmdk 33 | 88,118.257394,pmdk 34 | 1,1698.892456,pmdk 35 | 2,945.760039,pmdk 36 | 4,559.500666,pmdk 37 | 6,409.212670,pmdk 38 | 10,262.921717,pmdk 39 | 16,176.813932,pmdk 40 | 20,145.974555,pmdk 41 | 24,164.114311,pmdk 42 | 32,132.339209,pmdk 43 | 40,114.075109,pmdk 44 | 48,125.064678,pmdk 45 | 60,88.785219,pmdk 46 | 72,84.627242,pmdk 47 | 80,85.098787,pmdk 48 | 84,103.448168,pmdk 49 | 88,101.187341,pmdk 50 | -------------------------------------------------------------------------------- /data/uncached+dax/threadtest/threadtest_r.csv: -------------------------------------------------------------------------------- 1 | thread,exec_time,allocator 2 | 1,27.723941,r 3 | 2,13.801252,r 4 | 4,7.339548,r 5 | 6,5.111066,r 6 | 10,3.388551,r 7 | 16,2.644505,r 8 | 20,2.432483,r 9 | 24,3.121612,r 10 | 32,2.687394,r 11 | 40,2.295128,r 12 | 48,3.847986,r 13 | 60,3.711920,r 14 | 72,4.606312,r 15 | 80,4.614169,r 16 | 84,5.311468,r 17 | 88,4.695202,r 18 | 1,27.246582,r 19 | 2,13.803694,r 20 | 4,7.329813,r 21 | 6,5.105276,r 22 | 10,3.395511,r 23 | 16,2.646510,r 24 | 20,2.445088,r 25 | 24,3.104953,r 26 | 32,2.688795,r 27 | 40,2.324029,r 28 | 48,3.891076,r 29 | 60,3.728057,r 30 | 72,4.555103,r 31 | 80,4.831661,r 32 | 84,4.998711,r 33 | 88,4.803132,r 34 | 1,27.161880,r 35 | 2,13.789450,r 36 | 4,7.337044,r 37 | 6,5.103591,r 38 | 10,3.394627,r 39 | 16,2.649186,r 40 | 20,2.447311,r 41 | 24,3.097314,r 42 | 32,2.699908,r 43 | 40,2.313039,r 44 | 48,3.823590,r 45 | 60,3.867793,r 46 | 72,4.330304,r 47 | 80,4.898590,r 48 | 84,5.220448,r 49 | 88,4.675061,r 50 | -------------------------------------------------------------------------------- /data/uncached+dax/threadtest_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/uncached+dax/threadtest_linchart.pdf -------------------------------------------------------------------------------- /data/ycsbca_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/ycsbca_linchart.pdf -------------------------------------------------------------------------------- /data/ycsbcb_linchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/data/ycsbcb_linchart.pdf -------------------------------------------------------------------------------- /ext/lrmalloc/.gitignore: -------------------------------------------------------------------------------- 1 | sc/ 2 | *.so 3 | *.a 4 | *.o 5 | *.swp 6 | *.vscode -------------------------------------------------------------------------------- /ext/lrmalloc/COPYING: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Ricardo Leite 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ext/lrmalloc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019 Ricardo Leite. All rights reserved. 3 | # Licenced under the MIT licence. See COPYING file in the project root for details. 4 | # 5 | 6 | CCX=g++ 7 | DFLAGS=-ggdb -g -fno-omit-frame-pointer 8 | CXXFLAGS=-shared -fPIC -std=gnu++14 -O3 -Wall $(DFLAGS) \ 9 | -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc \ 10 | -fno-builtin-calloc -fno-builtin-cfree -fno-builtin-memalign \ 11 | -fno-builtin-posix_memalign -fno-builtin-valloc -fno-builtin-pvalloc \ 12 | -fno-builtin -fsized-deallocation 13 | 14 | LDFLAGS=-ldl -pthread 15 | 16 | OBJFILES=lrmalloc.o size_classes.o pages.o pagemap.o tcache.o thread_hooks.o 17 | 18 | default: lrmalloc.so lrmalloc.a 19 | 20 | %.o : %.cpp 21 | $(CCX) $(CXXFLAGS) -c -o $@ $< $(LDFLAGS) 22 | 23 | lrmalloc.so: $(OBJFILES) 24 | $(CCX) $(CXXFLAGS) -o lrmalloc.so $(OBJFILES) $(LDFLAGS) 25 | 26 | lrmalloc.a: $(OBJFILES) 27 | ar rcs lrmalloc.a $(OBJFILES) 28 | 29 | clean: 30 | rm -f *.so *.o *.a 31 | -------------------------------------------------------------------------------- /ext/lrmalloc/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Introduction 3 | ---- 4 | lrmalloc is an efficient, lock-free malloc(3) implementation. 5 | 6 | It is derived from [Michael's lock-free allocator](https://dl.acm.org/citation.cfm?doid=996841.996848), improved with modern memory allocator features such as thread caches and allocator/user memory segregation. 7 | 8 | lrmalloc's philosophy is to provide fast synchronization-free allocations as much sa possible through the use of thread caches, and only use lock-free operations to fill and empty thread caches. 9 | 10 | ## Usage 11 | ---- 12 | To compile, just download this repository and run 13 | ```console 14 | make 15 | ``` 16 | 17 | If successfully compiled, you can link lrmalloc with your application at compile time with 18 | ```console 19 | -llrmalloc 20 | ``` 21 | or you can dynamically link it with your application by using LD_PRELOAD (if your application was not statically linked with another memory allocator). 22 | ```console 23 | LD_PRELOAD=lrmalloc.so ./your_application 24 | ``` 25 | ## Copyright 26 | 27 | License: MIT 28 | 29 | Read file [COPYING](COPYING). 30 | 31 | -------------------------------------------------------------------------------- /ext/lrmalloc/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Ricardo Leite. All rights reserved. 3 | * Licenced under the MIT licence. See COPYING file in the project root for details. 4 | */ 5 | 6 | #ifndef __LOG_H 7 | #define __LOG_H 8 | 9 | #include 10 | #include 11 | 12 | // if 1, enables assertions and other sanity checks 13 | #define LFMALLOC_SANITY 0 14 | // if 1, enables debug output 15 | #define LFMALLOC_DEBUG 0 16 | 17 | #if LFMALLOC_DEBUG 18 | #define LOG_DEBUG(STR, ...) \ 19 | fprintf(stdout, "%s:%d %s " STR "\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__); 20 | 21 | #else 22 | #define LOG_DEBUG(str, ...) 23 | 24 | #endif 25 | 26 | #define LOG_ERR(STR, ...) \ 27 | fprintf(stderr, "%s:%d %s " STR "\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__) 28 | 29 | #if LFMALLOC_SANITY 30 | #define ASSERT(x) do { if (!(x)) abort(); } while (0) 31 | #else 32 | #define ASSERT(x) 33 | #endif 34 | 35 | #endif // _LOG_H 36 | 37 | -------------------------------------------------------------------------------- /ext/lrmalloc/pagemap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Ricardo Leite. All rights reserved. 3 | * Licenced under the MIT licence. See COPYING file in the project root for details. 4 | */ 5 | 6 | #include "pagemap.h" 7 | #include "pages.h" 8 | #include "log.h" 9 | 10 | PageMap sPageMap; 11 | 12 | void PageMap::Init() 13 | { 14 | // pages will necessarily be given by the OS 15 | // so they're already initialized and zero'd 16 | // PM_SZ is necessarily aligned to page size 17 | _pagemap = (std::atomic*)PageAllocOvercommit(PM_SZ); 18 | ASSERT(_pagemap); 19 | } 20 | -------------------------------------------------------------------------------- /ext/lrmalloc/pages.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Ricardo Leite. All rights reserved. 3 | * Licenced under the MIT licence. See COPYING file in the project root for details. 4 | */ 5 | 6 | #include 7 | 8 | #include "pages.h" 9 | #include "log.h" 10 | 11 | void* PageAlloc(size_t size) 12 | { 13 | ASSERT((size & PAGE_MASK) == 0); 14 | 15 | void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE, 16 | MAP_PRIVATE | MAP_ANON, -1, 0); 17 | if (ptr == MAP_FAILED) 18 | ptr = nullptr; 19 | 20 | return ptr; 21 | } 22 | 23 | void* PageAllocOvercommit(size_t size) 24 | { 25 | ASSERT((size & PAGE_MASK) == 0); 26 | 27 | // use no MAP_NORESERVE to skip OS overcommit limits 28 | void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE, 29 | MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -1, 0); 30 | if (ptr == MAP_FAILED) 31 | ptr = nullptr; 32 | 33 | return ptr; 34 | } 35 | 36 | void PageFree(void* ptr, size_t size) 37 | { 38 | ASSERT((size & PAGE_MASK) == 0); 39 | 40 | int ret = munmap(ptr, size); 41 | (void)ret; // suppress warning 42 | ASSERT(ret == 0); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /ext/lrmalloc/pages.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Ricardo Leite. All rights reserved. 3 | * Licenced under the MIT licence. See COPYING file in the project root for details. 4 | */ 5 | 6 | #ifndef __PAGES_H 7 | #define __PAGES_H 8 | 9 | #include 10 | #include "defines.h" 11 | 12 | // return page address for page containing a 13 | #define PAGE_ADDR2BASE(a) \ 14 | ((void*)((uintptr)(a) & ~PAGE_MASK)) 15 | 16 | // returns a set of continous pages, totaling to size bytes 17 | void* PageAlloc(size_t size); 18 | // explictely allow overcommiting 19 | // used for array-based page map 20 | void* PageAllocOvercommit(size_t size); 21 | // free a set of continous pages, totaling to size bytes 22 | void PageFree(void* ptr, size_t size); 23 | 24 | #endif // __PAGES_H 25 | -------------------------------------------------------------------------------- /ext/lrmalloc/tcache.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Ricardo Leite. All rights reserved. 3 | * Licenced under the MIT licence. See COPYING file in the project root for details. 4 | */ 5 | 6 | #include "tcache.h" 7 | 8 | // thread cache, uses tsd/tls 9 | // one cache per thread 10 | __thread TCacheBin TCache[MAX_SZ_IDX]; 11 | 12 | -------------------------------------------------------------------------------- /ext/lrmalloc/tcache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Ricardo Leite. All rights reserved. 3 | * Licenced under the MIT licence. See COPYING file in the project root for details. 4 | */ 5 | 6 | #ifndef __TCACHE_H_ 7 | #define __TCACHE_H_ 8 | 9 | #include "defines.h" 10 | #include "size_classes.h" 11 | #include "log.h" 12 | 13 | struct TCacheBin 14 | { 15 | private: 16 | char* _block = nullptr; 17 | uint32_t _blockNum = 0; 18 | 19 | public: 20 | // common, fast ops 21 | void PushBlock(char* block); 22 | // push block list, cache *must* be empty 23 | void PushList(char* block, uint32_t length); 24 | 25 | char* PopBlock(); // can return nullptr 26 | // manually popped list of blocks and now need to update cache 27 | // `block` is the new head 28 | void PopList(char* block, uint32_t length); 29 | char* PeekBlock() const { return _block; } 30 | 31 | uint32_t GetBlockNum() const { return _blockNum; } 32 | 33 | // slow operations like fill/flush handled in cache user 34 | }; 35 | 36 | inline void TCacheBin::PushBlock(char* block) 37 | { 38 | // block has at least sizeof(char*) 39 | *(char**)block = _block; 40 | _block = block; 41 | _blockNum++; 42 | } 43 | 44 | inline void TCacheBin::PushList(char* block, uint32_t length) 45 | { 46 | // caller must ensure there's no available block 47 | // this op is only used to fill empty cache 48 | ASSERT(_blockNum == 0); 49 | 50 | _block = block; 51 | _blockNum = length; 52 | } 53 | 54 | inline char* TCacheBin::PopBlock() 55 | { 56 | // caller must ensure there's an available block 57 | ASSERT(_blockNum > 0); 58 | 59 | char* ret = _block; 60 | _block = *(char**)_block; 61 | _blockNum--; 62 | return ret; 63 | } 64 | 65 | inline void TCacheBin::PopList(char* block, uint32_t length) 66 | { 67 | ASSERT(_blockNum >= length); 68 | 69 | _block = block; 70 | _blockNum -= length; 71 | } 72 | 73 | // use tls init exec model 74 | extern __thread TCacheBin TCache[MAX_SZ_IDX] 75 | LFMALLOC_TLS_INIT_EXEC LFMALLOC_CACHE_ALIGNED; 76 | 77 | #endif // __TCACHE_H_ 78 | 79 | -------------------------------------------------------------------------------- /ext/makalu_alloc/Makefile: -------------------------------------------------------------------------------- 1 | BASE_DIR := . 2 | SRC_DIR := $(BASE_DIR)/src 3 | 4 | LIBDIR := $(BASE_DIR)/lib 5 | 6 | LIBATOMIC_DIR := $(BASE_DIR)/libatomic 7 | 8 | SRC_FILES := makalu_base_md.c makalu_hdr.c \ 9 | makalu_init.c makalu_mark.c \ 10 | makalu_transient.c makalu_persistent.c \ 11 | makalu_util.c makalu_reclaim.c \ 12 | makalu_block.c makalu_thread.c \ 13 | makalu_local_heap.c makalu_malloc.c 14 | 15 | INCLUDES := -I $(LIBATOMIC_DIR)/include \ 16 | -I $(SRC_DIR)/internal_include \ 17 | -I $(BASE_DIR)/include 18 | 19 | SRC := $(addprefix $(SRC_DIR)/, $(SRC_FILES)) 20 | 21 | OBJS := ${SRC:.c=.o} 22 | 23 | LIBNAME :=libmakalu.a 24 | 25 | PWB_TYPE ?= CLFLUSH 26 | 27 | CC := gcc 28 | CFLAGS := -g -O3 -Wall -c -DPWB_IS_$(PWB_TYPE) -fPIC 29 | MKDIR := mkdir -p 30 | AR := ar 31 | RANLIB := ranlib 32 | RM := rm -f 33 | 34 | .PHONY: all 35 | all: depend directories $(LIBDIR)/$(LIBNAME) 36 | 37 | 38 | depend: .depend 39 | 40 | 41 | .depend: $(SRC) 42 | $(RM) ./.depend 43 | $(CC) $(CFLAGS) $(INCLUDES) -MM $^>>./.depend; 44 | 45 | include .depend 46 | 47 | 48 | .PHONY: directories 49 | directories: 50 | $(MKDIR) $(LIBDIR) 51 | 52 | $(LIBDIR)/$(LIBNAME): $(OBJS) 53 | $(AR) cr $@ $^ 54 | $(RANLIB) $@ 55 | 56 | .PHONY: clean 57 | 58 | clean: 59 | $(RM) $(OBJS) 60 | $(RM) $(LIBDIR)/$(LIBNAME) 61 | 62 | .c.o: 63 | $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ 64 | 65 | -------------------------------------------------------------------------------- /ext/makalu_alloc/README.md: -------------------------------------------------------------------------------- 1 | # Makalu : NVRAM Memory Allocator 2 | 3 | Makalu is a failure-resilient, thread-safe memory allocator 4 | that can be used for the allocation of byte-addressable 5 | non-volatile memory (NVRAM). Makalu is designed to restart 6 | across execution cycles using durable metadata 7 | stored in NVRAM. While it takes advantage of 8 | transient DRAM, CPU caches, and registers, 9 | Makalu internal crash consistency mechanism is developed 10 | with the assumption that only the data in NVRAM survive a 11 | crash. It uses memory fences, and selective cache 12 | line flushing instructions to guarantee the 13 | timely visibility of updates to its persistent metadata. 14 | 15 | Makalu is expected to be used together with other NVRAM 16 | programming libraries (NVMPLs) such Atlas, and Mnemosyne. In such 17 | use-case scenario, the NVMPL ensures the consistency of the 18 | user data stored in heap, while Makalu ensures the consistency 19 | of the heap structure and the absence of failure-induced memory 20 | leaks. Makalu can be used in the absence of NVMPL as a stand-alone 21 | allocator. However, in such use-case, it is upto the programmer to 22 | ensure the consistency of the data stored in persistent heap 23 | across failures and restarts. We only recommend this for experts 24 | in persistent programming. 25 | 26 | Makalu has two distinct phases in which it operates. In an **online phase**, 27 | a user can allocate and deallocate 28 | persistent memory after proper initialization. After an ungraceful shutdown, 29 | Makalu is expected to start in **offline phase** for recovery and offline 30 | garbage collection. 31 | 32 | 33 | ##Makalu API## 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ext/makalu_alloc/examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/examples/README.md -------------------------------------------------------------------------------- /ext/makalu_alloc/examples/fill-heap/compile.sh: -------------------------------------------------------------------------------- 1 | 2 | gcc -O0 -pthread \ 3 | -I ../../region_manager \ 4 | -I ../../include \ 5 | -o fill-start \ 6 | fill-start.c \ 7 | ../../region_manager/region_manager.c \ 8 | ../../lib/libmakalu.a ../../libatomic/lib/libatomic_ops.a 9 | 10 | gcc -O0 -pthread \ 11 | -I ../../region_manager \ 12 | -I ../../include \ 13 | -o fill-recover \ 14 | fill-recover.c \ 15 | ../../region_manager/region_manager.c \ 16 | ../../lib/libmakalu.a ../../libatomic/lib/libatomic_ops.a 17 | 18 | gcc -O0 -pthread \ 19 | -I ../../region_manager \ 20 | -I ../../include \ 21 | -o fill-restart \ 22 | fill-restart.c \ 23 | ../../region_manager/region_manager.c \ 24 | ../../lib/libmakalu.a ../../libatomic/lib/libatomic_ops.a 25 | -------------------------------------------------------------------------------- /ext/makalu_alloc/examples/fill-heap/fill-recover.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 2016 Hewlett Packard Enterprise Development LP 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation, either version 3 of the 7 | * License, or (at your option) any later version. This program is 8 | * distributed in the hope that it will be useful, but WITHOUT ANY 9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 | * for more details. You should have received a copy of the GNU Lesser 12 | * General Public License along with this program. If not, see 13 | * . 14 | */ 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "region_manager.h" 23 | #include "makalu.h" 24 | 25 | /* Fill-recover recovers and */ 26 | /* collects crash induced leaks */ 27 | 28 | int main(int argc, char *argv[]) 29 | { 30 | 31 | __remap_persistent_region(); 32 | void* hstart = __fetch_heap_start(); 33 | printf("Heap start address: %p\n", hstart); 34 | 35 | MAK_start_off(hstart, &__nvm_region_allocator); 36 | if (MAK_collect_off()) 37 | printf("Successful GC offline\n"); 38 | 39 | MAK_close(); 40 | 41 | __close_persistent_region(); 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /ext/makalu_alloc/lib/libmakalu.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/lib/libmakalu.a -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/ao_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | #ifndef AO_ATOMIC_OPS_H 24 | # error This file should not be included directly. 25 | #endif 26 | 27 | /* The policy regarding version numbers: development code has odd */ 28 | /* "minor" number (and "micro" part is 0); when development is finished */ 29 | /* and a release is prepared, "minor" number is incremented (keeping */ 30 | /* "micro" number still zero), whenever a defect is fixed a new release */ 31 | /* is prepared incrementing "micro" part to odd value (the most stable */ 32 | /* release has the biggest "micro" number). */ 33 | 34 | /* The version here should match that in configure.ac and README. */ 35 | #define AO_VERSION_MAJOR 7 36 | #define AO_VERSION_MINOR 7 37 | #define AO_VERSION_MICRO 0 /* 7.7.0 */ 38 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/all_acquire_release_volatile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Describes architectures on which volatile AO_t, unsigned char, */ 24 | /* unsigned short, and unsigned int loads and stores have */ 25 | /* acquire/release semantics for all normally legal alignments. */ 26 | 27 | #include "loadstore/acquire_release_volatile.h" 28 | #include "loadstore/char_acquire_release_volatile.h" 29 | #include "loadstore/short_acquire_release_volatile.h" 30 | #include "loadstore/int_acquire_release_volatile.h" 31 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/all_aligned_atomic_load_store.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Describes architectures on which AO_t, unsigned char, unsigned */ 24 | /* short, and unsigned int loads and stores are atomic but only if data */ 25 | /* is suitably aligned. */ 26 | 27 | #define AO_ACCESS_CHECK_ALIGNED 28 | /* Check for char type is a misnomer. */ 29 | #define AO_ACCESS_short_CHECK_ALIGNED 30 | #define AO_ACCESS_int_CHECK_ALIGNED 31 | #include "all_atomic_load_store.h" 32 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/all_atomic_load_store.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Describes architectures on which AO_t, unsigned char, unsigned */ 24 | /* short, and unsigned int loads and stores are atomic for all normally */ 25 | /* legal alignments. */ 26 | 27 | #include "all_atomic_only_load.h" 28 | 29 | #include "loadstore/atomic_store.h" 30 | #include "loadstore/char_atomic_store.h" 31 | #include "loadstore/short_atomic_store.h" 32 | #include "loadstore/int_atomic_store.h" 33 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/all_atomic_only_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Describes architectures on which AO_t, unsigned char, unsigned */ 24 | /* short, and unsigned int loads are atomic for all normally legal */ 25 | /* alignments. */ 26 | 27 | #include "loadstore/atomic_load.h" 28 | #include "loadstore/char_atomic_load.h" 29 | #include "loadstore/short_atomic_load.h" 30 | #include "loadstore/int_atomic_load.h" 31 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/gcc/alpha.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. 3 | * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. 4 | * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. 5 | * 6 | * 7 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED 8 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 9 | * 10 | * Permission is hereby granted to use or copy this program 11 | * for any purpose, provided the above notices are retained on all copies. 12 | * Permission to modify the code and to distribute modified code is granted, 13 | * provided the above notices are retained, and a notice that the code was 14 | * modified is included with the above copyright notice. 15 | * 16 | */ 17 | 18 | #include "../loadstore/atomic_load.h" 19 | #include "../loadstore/atomic_store.h" 20 | 21 | #include "../test_and_set_t_is_ao_t.h" 22 | 23 | #define AO_NO_DD_ORDERING 24 | /* Data dependence does not imply read ordering. */ 25 | 26 | AO_INLINE void 27 | AO_nop_full(void) 28 | { 29 | __asm__ __volatile__("mb" : : : "memory"); 30 | } 31 | #define AO_HAVE_nop_full 32 | 33 | AO_INLINE void 34 | AO_nop_write(void) 35 | { 36 | __asm__ __volatile__("wmb" : : : "memory"); 37 | } 38 | #define AO_HAVE_nop_write 39 | 40 | /* mb should be used for AO_nop_read(). That's the default. */ 41 | 42 | /* TODO: implement AO_fetch_and_add explicitly. */ 43 | 44 | /* We believe that ldq_l ... stq_c does not imply any memory barrier. */ 45 | AO_INLINE int 46 | AO_compare_and_swap(volatile AO_t *addr, 47 | AO_t old, AO_t new_val) 48 | { 49 | unsigned long was_equal; 50 | unsigned long temp; 51 | 52 | __asm__ __volatile__( 53 | "1: ldq_l %0,%1\n" 54 | " cmpeq %0,%4,%2\n" 55 | " mov %3,%0\n" 56 | " beq %2,2f\n" 57 | " stq_c %0,%1\n" 58 | " beq %0,1b\n" 59 | "2:\n" 60 | : "=&r" (temp), "+m" (*addr), "=&r" (was_equal) 61 | : "r" (new_val), "Ir" (old) 62 | :"memory"); 63 | return (int)was_equal; 64 | } 65 | #define AO_HAVE_compare_and_swap 66 | 67 | /* TODO: implement AO_fetch_compare_and_swap */ 68 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/gcc/riscv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED 3 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 4 | * 5 | * Permission is hereby granted to use or copy this program 6 | * for any purpose, provided the above notices are retained on all copies. 7 | * Permission to modify the code and to distribute modified code is granted, 8 | * provided the above notices are retained, and a notice that the code was 9 | * modified is included with the above copyright notice. 10 | */ 11 | 12 | /* As of gcc-7.2.0, some __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n are missing. */ 13 | /* The operations are lock-free (even for the types smaller than word). */ 14 | #define AO_GCC_FORCE_HAVE_CAS 15 | 16 | /* While double-word atomic operations are provided by the compiler */ 17 | /* (which requires -latomic currently), they are not lock-free as */ 18 | /* riscv itself does not have the double-word atomic operations. */ 19 | 20 | #include "generic.h" 21 | 22 | #undef AO_GCC_FORCE_HAVE_CAS 23 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/gcc/sh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009 by Takashi YOSHII. All rights reserved. 3 | * 4 | * 5 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED 6 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 7 | * 8 | * Permission is hereby granted to use or copy this program 9 | * for any purpose, provided the above notices are retained on all copies. 10 | * Permission to modify the code and to distribute modified code is granted, 11 | * provided the above notices are retained, and a notice that the code was 12 | * modified is included with the above copyright notice. 13 | */ 14 | 15 | #include "../all_atomic_load_store.h" 16 | #include "../ordered.h" 17 | 18 | /* sh has tas.b(byte) only */ 19 | #include "../test_and_set_t_is_char.h" 20 | 21 | AO_INLINE AO_TS_VAL_t 22 | AO_test_and_set_full(volatile AO_TS_t *addr) 23 | { 24 | int oldval; 25 | __asm__ __volatile__( 26 | "tas.b @%1; movt %0" 27 | : "=r" (oldval) 28 | : "r" (addr) 29 | : "t", "memory"); 30 | return oldval? AO_TS_CLEAR : AO_TS_SET; 31 | } 32 | #define AO_HAVE_test_and_set_full 33 | 34 | /* TODO: Very incomplete. */ 35 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/gcc/tile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED 3 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 4 | * 5 | * Permission is hereby granted to use or copy this program 6 | * for any purpose, provided the above notices are retained on all copies. 7 | * Permission to modify the code and to distribute modified code is granted, 8 | * provided the above notices are retained, and a notice that the code was 9 | * modified is included with the above copyright notice. 10 | */ 11 | 12 | /* Minimal support for tile. */ 13 | 14 | #if (AO_GNUC_PREREQ(4, 8) || AO_CLANG_PREREQ(3, 4)) \ 15 | && !defined(AO_DISABLE_GCC_ATOMICS) 16 | 17 | # include "generic.h" 18 | 19 | #else /* AO_DISABLE_GCC_ATOMICS */ 20 | 21 | # include "../all_atomic_load_store.h" 22 | 23 | # include "../test_and_set_t_is_ao_t.h" 24 | 25 | AO_INLINE void 26 | AO_nop_full(void) 27 | { 28 | __sync_synchronize(); 29 | } 30 | # define AO_HAVE_nop_full 31 | 32 | AO_INLINE AO_t 33 | AO_fetch_and_add_full(volatile AO_t *p, AO_t incr) 34 | { 35 | return __sync_fetch_and_add(p, incr); 36 | } 37 | # define AO_HAVE_fetch_and_add_full 38 | 39 | AO_INLINE AO_t 40 | AO_fetch_compare_and_swap_full(volatile AO_t *addr, AO_t old_val, 41 | AO_t new_val) 42 | { 43 | return __sync_val_compare_and_swap(addr, old_val, new_val 44 | /* empty protection list */); 45 | } 46 | # define AO_HAVE_fetch_compare_and_swap_full 47 | 48 | #endif /* AO_DISABLE_GCC_ATOMICS */ 49 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/atomic_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which loads of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE AO_t 28 | AO_load(const volatile AO_t *addr) 29 | { 30 | # ifdef AO_ACCESS_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | /* Cast away the volatile for architectures like IA64 where */ 34 | /* volatile adds barrier (fence) semantics. */ 35 | return *(const AO_t *)addr; 36 | } 37 | #define AO_HAVE_load 38 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/atomic_store.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which stores of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE void 28 | AO_store(volatile AO_t *addr, AO_t new_val) 29 | { 30 | # ifdef AO_ACCESS_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | *(AO_t *)addr = new_val; 34 | } 35 | #define AO_HAVE_store 36 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/char_atomic_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which loads of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE unsigned/**/char 28 | AO_char_load(const volatile unsigned/**/char *addr) 29 | { 30 | # ifdef AO_ACCESS_char_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | /* Cast away the volatile for architectures like IA64 where */ 34 | /* volatile adds barrier (fence) semantics. */ 35 | return *(const unsigned/**/char *)addr; 36 | } 37 | #define AO_HAVE_char_load 38 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/char_atomic_store.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which stores of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE void 28 | AO_char_store(volatile unsigned/**/char *addr, unsigned/**/char new_val) 29 | { 30 | # ifdef AO_ACCESS_char_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | *(unsigned/**/char *)addr = new_val; 34 | } 35 | #define AO_HAVE_char_store 36 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/double_atomic_load_store.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which AO_double_t loads and stores */ 24 | /* are atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE AO_double_t 28 | AO_double_load(const volatile AO_double_t *addr) 29 | { 30 | AO_double_t result; 31 | 32 | # ifdef AO_ACCESS_double_CHECK_ALIGNED 33 | assert(((size_t)addr & (sizeof(AO_double_t) - 1)) == 0); 34 | # endif 35 | /* Cast away the volatile in case it adds fence semantics. */ 36 | result.AO_whole = ((const AO_double_t *)addr)->AO_whole; 37 | return result; 38 | } 39 | #define AO_HAVE_double_load 40 | 41 | AO_INLINE void 42 | AO_double_store(volatile AO_double_t *addr, AO_double_t new_val) 43 | { 44 | # ifdef AO_ACCESS_double_CHECK_ALIGNED 45 | assert(((size_t)addr & (sizeof(AO_double_t) - 1)) == 0); 46 | # endif 47 | ((AO_double_t *)addr)->AO_whole = new_val.AO_whole; 48 | } 49 | #define AO_HAVE_double_store 50 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/int_atomic_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which loads of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE unsigned 28 | AO_int_load(const volatile unsigned *addr) 29 | { 30 | # ifdef AO_ACCESS_int_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | /* Cast away the volatile for architectures like IA64 where */ 34 | /* volatile adds barrier (fence) semantics. */ 35 | return *(const unsigned *)addr; 36 | } 37 | #define AO_HAVE_int_load 38 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/int_atomic_store.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which stores of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE void 28 | AO_int_store(volatile unsigned *addr, unsigned new_val) 29 | { 30 | # ifdef AO_ACCESS_int_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | *(unsigned *)addr = new_val; 34 | } 35 | #define AO_HAVE_int_store 36 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/short_atomic_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which loads of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE unsigned/**/short 28 | AO_short_load(const volatile unsigned/**/short *addr) 29 | { 30 | # ifdef AO_ACCESS_short_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | /* Cast away the volatile for architectures like IA64 where */ 34 | /* volatile adds barrier (fence) semantics. */ 35 | return *(const unsigned/**/short *)addr; 36 | } 37 | #define AO_HAVE_short_load 38 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/loadstore/short_atomic_store.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* Definitions for architectures on which stores of given type are */ 24 | /* atomic (either for suitably aligned data only or for any legal */ 25 | /* alignment). */ 26 | 27 | AO_INLINE void 28 | AO_short_store(volatile unsigned/**/short *addr, unsigned/**/short new_val) 29 | { 30 | # ifdef AO_ACCESS_short_CHECK_ALIGNED 31 | assert(((size_t)addr & (sizeof(*addr) - 1)) == 0); 32 | # endif 33 | *(unsigned/**/short *)addr = new_val; 34 | } 35 | #define AO_HAVE_short_store 36 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/ordered.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* These are common definitions for architectures that provide */ 24 | /* processor ordered memory operations. */ 25 | 26 | #include "ordered_except_wr.h" 27 | 28 | AO_INLINE void 29 | AO_nop_full(void) 30 | { 31 | AO_compiler_barrier(); 32 | } 33 | #define AO_HAVE_nop_full 34 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/ordered_except_wr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* 24 | * These are common definitions for architectures that provide processor 25 | * ordered memory operations except that a later read may pass an 26 | * earlier write. Real x86 implementations seem to be in this category, 27 | * except apparently for some IDT WinChips, which we ignore. 28 | */ 29 | 30 | #include "read_ordered.h" 31 | 32 | AO_INLINE void 33 | AO_nop_write(void) 34 | { 35 | /* AO_nop_write implementation is the same as of AO_nop_read. */ 36 | AO_compiler_barrier(); 37 | /* sfence according to Intel docs. Pentium 3 and up. */ 38 | /* Unnecessary for cached accesses? */ 39 | } 40 | #define AO_HAVE_nop_write 41 | 42 | #include "loadstore/ordered_stores_only.h" 43 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/read_ordered.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* 24 | * These are common definitions for architectures that provide processor 25 | * ordered memory operations except that a later read may pass an 26 | * earlier write. Real x86 implementations seem to be in this category, 27 | * except apparently for some IDT WinChips, which we ignore. 28 | */ 29 | 30 | AO_INLINE void 31 | AO_nop_read(void) 32 | { 33 | AO_compiler_barrier(); 34 | } 35 | #define AO_HAVE_nop_read 36 | 37 | #include "loadstore/ordered_loads_only.h" 38 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/sunc/sparc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | #include "../all_atomic_load_store.h" 24 | 25 | /* Real SPARC code uses TSO: */ 26 | #include "../ordered_except_wr.h" 27 | 28 | /* Test_and_set location is just a byte. */ 29 | #include "../test_and_set_t_is_char.h" 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | extern AO_TS_VAL_t 36 | AO_test_and_set_full(volatile AO_TS_t *addr); 37 | /* Implemented in separate .S file, for now. */ 38 | #define AO_HAVE_test_and_set_full 39 | 40 | /* TODO: Like the gcc version, extend this for V8 and V9. */ 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* 24 | * These are common definitions for architectures on which test_and_set 25 | * operates on pointer-sized quantities, the "clear" value contains 26 | * all zeroes, and the "set" value contains only one lowest bit set. 27 | * This can be used if test_and_set is synthesized from compare_and_swap. 28 | */ 29 | typedef enum {AO_TS_clear = 0, AO_TS_set = 1} AO_TS_val; 30 | #define AO_TS_VAL_t AO_TS_val 31 | #define AO_TS_CLEAR AO_TS_clear 32 | #define AO_TS_SET AO_TS_set 33 | 34 | #define AO_TS_t AO_t 35 | 36 | #define AO_AO_TS_T 1 37 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/include/atomic_ops/sysdeps/test_and_set_t_is_char.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | /* 24 | * These are common definitions for architectures on which test_and_set 25 | * operates on byte sized quantities, the "clear" value contains 26 | * all zeroes, and the "set" value contains all ones typically. 27 | */ 28 | 29 | #ifndef AO_GCC_ATOMIC_TEST_AND_SET 30 | # define AO_TS_SET_TRUEVAL 0xff 31 | #elif defined(__GCC_ATOMIC_TEST_AND_SET_TRUEVAL) \ 32 | && !defined(AO_PREFER_GENERALIZED) 33 | # define AO_TS_SET_TRUEVAL __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 34 | #else 35 | # define AO_TS_SET_TRUEVAL 1 /* true */ 36 | #endif 37 | 38 | typedef enum { 39 | AO_BYTE_TS_clear = 0, 40 | AO_BYTE_TS_set = AO_TS_SET_TRUEVAL 41 | } AO_BYTE_TS_val; 42 | 43 | #define AO_TS_VAL_t AO_BYTE_TS_val 44 | #define AO_TS_CLEAR AO_BYTE_TS_clear 45 | #define AO_TS_SET AO_BYTE_TS_set 46 | 47 | #define AO_TS_t unsigned char 48 | 49 | #define AO_CHAR_TS_T 1 50 | 51 | #undef AO_TS_SET_TRUEVAL 52 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/lib/libatomic_ops.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/libatomic/lib/libatomic_ops.a -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/lib/libatomic_ops.la: -------------------------------------------------------------------------------- 1 | # libatomic_ops.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.6 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='' 9 | 10 | # Names of this library. 11 | library_names='' 12 | 13 | # The name of the static archive. 14 | old_library='libatomic_ops.a' 15 | 16 | # Linker flags that cannot go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs='' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libatomic_ops. 26 | current=2 27 | age=1 28 | revision=1 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/local/lib' 42 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/lib/libatomic_ops_gpl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/libatomic/lib/libatomic_ops_gpl.a -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/lib/libatomic_ops_gpl.la: -------------------------------------------------------------------------------- 1 | # libatomic_ops_gpl.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.6 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='' 9 | 10 | # Names of this library. 11 | library_names='' 12 | 13 | # The name of the static archive. 14 | old_library='libatomic_ops_gpl.a' 15 | 16 | # Linker flags that cannot go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' /usr/local/lib/libatomic_ops.la' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libatomic_ops_gpl. 26 | current=2 27 | age=1 28 | revision=2 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/local/lib' 42 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/lib/pkgconfig/atomic_ops.pc: -------------------------------------------------------------------------------- 1 | prefix=/u/wcai6/Dropbox/Code/PersistentWordSTM/pstm/src/makalu_alloc/libatomic 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: The atomic_ops library 7 | Description: Atomic memory update operations portable implementation 8 | Version: 7.7.0 9 | Libs: -L${libdir} -latomic_ops 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /ext/makalu_alloc/libatomic/share/doc/libatomic_ops/README_win32.txt: -------------------------------------------------------------------------------- 1 | Most of the atomic_ops functionality is available under Win32 with 2 | the Microsoft tools, but the build process currently is considerably more 3 | primitive than on Linux/Unix platforms. 4 | 5 | To build: 6 | 7 | 1) Go to the src directory in the distribution. 8 | 2) Make sure the Microsoft command-line tools (e.g. nmake) are available. 9 | 3) Run "nmake -f Makefile.msft". This should run some tests, which 10 | may print warnings about the types of the "Interlocked" functions. 11 | I haven't been able to make all versions of VC++ happy. If you know 12 | how to, please send a patch. 13 | 4) To compile applications, you will need to retain or copy the following 14 | pieces from the resulting src directory contents: 15 | "atomic_ops.h" - Header file defining low-level primitives. This 16 | includes files from: 17 | "atomic_ops"- Subdirectory containing implementation header files. 18 | "atomic_ops_stack.h" - Header file describing almost lock-free stack. 19 | "atomic_ops_malloc.h" - Header file describing almost lock-free malloc. 20 | "libatomic_ops_gpl.lib" - Library containing implementation of the 21 | above two (plus AO_pause() defined in atomic_ops.c). 22 | The atomic_ops.h implementation is entirely in the 23 | header files in Win32. 24 | 25 | If the client defines AO_ASSUME_VISTA (before include atomic_ops.h), it should 26 | make double_compare_and_swap_full available. 27 | 28 | Note that the library is covered by the GNU General Public License, while 29 | the top 2 of these pieces allow use in proprietary code. 30 | -------------------------------------------------------------------------------- /ext/makalu_alloc/src/internal_include/makalu_block.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 2016 Hewlett Packard Enterprise Development LP 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation, either version 3 of the 7 | * License, or (at your option) any later version. This program is 8 | * distributed in the hope that it will be useful, but WITHOUT ANY 9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 | * for more details. You should have received a copy of the GNU Lesser 12 | * General Public License along with this program. If not, see 13 | * . 14 | */ 15 | 16 | #ifndef _MAKALU_BLOCK_H 17 | #define _MAKALU_BLOCK_H 18 | 19 | #define FL_UNKNOWN -1 20 | 21 | # define INCR_FREE_BYTES(n, b) MAK_free_bytes[n] = MAK_free_bytes[n] + (b); 22 | 23 | MAK_INNER MAK_bool MAK_expand_hp_inner(word n); 24 | MAK_INNER MAK_bool MAK_finish_expand_hp_inner(); 25 | MAK_INNER void MAK_add_to_heap(struct hblk *space, size_t bytes, word expansion_slop); 26 | MAK_INNER void MAK_newfreehblk(struct hblk *hbp, word size); 27 | MAK_INNER struct hblk * 28 | MAK_allochblk(size_t sz, int kind, unsigned flags/* IGNORE_OFF_PAGE or 0 */); 29 | 30 | MAK_INNER void MAK_new_hblk(size_t gran, int kind); 31 | MAK_INNER MAK_bool MAK_try_expand_hp(word needed_blocks, 32 | MAK_bool ignore_off_page, MAK_bool retry); 33 | MAK_INNER void MAK_freehblk(struct hblk *hbp); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ext/makalu_alloc/src/internal_include/makalu_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 2016 Hewlett Packard Enterprise Development LP 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation, either version 3 of the 7 | * License, or (at your option) any later version. This program is 8 | * distributed in the hope that it will be useful, but WITHOUT ANY 9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 | * for more details. You should have received a copy of the GNU Lesser 12 | * General Public License along with this program. If not, see 13 | * . 14 | */ 15 | 16 | #ifndef _MAKALU_INIT_H 17 | #define _MAKALU_INIT_H 18 | 19 | /* determines whether we are starting for */ 20 | /* the first time, collecting offline or */ 21 | /* restarting online after a crash. */ 22 | MAK_EXTERN int MAK_run_mode; 23 | MAK_EXTERN MAK_bool MAK_is_initialized; 24 | 25 | #ifdef MAK_THREADS 26 | /* Must be called from the main thread */ 27 | /* for correct behavior */ 28 | /* Relies on main's thread local variable */ 29 | MAK_INNER void MAK_teardown_main_thread_local(void); 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /ext/makalu_alloc/src/internal_include/makalu_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 2016 Hewlett Packard Enterprise Development LP 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation, either version 3 of the 7 | * License, or (at your option) any later version. This program is 8 | * distributed in the hope that it will be useful, but WITHOUT ANY 9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 | * for more details. You should have received a copy of the GNU Lesser 12 | * General Public License along with this program. If not, see 13 | * . 14 | */ 15 | 16 | #ifndef _MAKALU_INTERNAL_H 17 | #define _MAKALU_INTERNAL_H 18 | 19 | #include "makalu_config.h" 20 | #include "makalu.h" 21 | #include "makalu_util.h" 22 | #include "makalu_hdr.h" 23 | #include "makalu_base_md.h" 24 | #include "makalu_transient.h" 25 | #include "makalu_persistent.h" 26 | #include "makalu_mark.h" 27 | #include "makalu_init.h" 28 | #include "makalu_reclaim.h" 29 | #include "makalu_block.h" 30 | #include "makalu_thread.h" 31 | #include "makalu_malloc.h" 32 | 33 | 34 | MAK_EXTERN word MAK_page_size; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /ext/makalu_alloc/src/internal_include/makalu_malloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _MAKALU_MALLOC_H 2 | #define _MAKALU_MALLOC_H 3 | 4 | MAK_INNER void MAK_generic_malloc_many(size_t lb, int k, fl_hdr* flh, 5 | hdr_cache_entry* hc, 6 | word hc_sz, 7 | void** aflush_tb, 8 | word aflush_tb_sz); 9 | 10 | MAK_INNER void * MAK_core_malloc(size_t); 11 | MAK_INNER void * MAK_generic_malloc(size_t lb, int k); 12 | MAK_INNER ptr_t MAK_alloc_large(size_t lb, int k, unsigned flags); 13 | MAK_INNER ptr_t MAK_allocobj(size_t gran, int kind); 14 | MAK_INNER void MAK_core_free(void* p, hdr* hhdr, int knd, 15 | size_t sz, size_t ngranules); 16 | 17 | MAK_INNER void MAK_generic_malloc_many(size_t lb, int k, fl_hdr* flh, 18 | hdr_cache_entry* hc, 19 | word hc_sz, 20 | void** aflush_tb, 21 | word aflush_tb_sz); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /ext/makalu_alloc/src/internal_include/pfence_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * We copied the methods from Romulus: 3 | * https://github.com/pramalhe/Romulus 4 | */ 5 | #ifndef PFENCE_UTIL_H 6 | #define PFENCE_UTIL_H 7 | 8 | #include 9 | 10 | static inline unsigned long long asm_rdtsc(void) 11 | { 12 | unsigned hi, lo; 13 | __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); 14 | return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 ); 15 | } 16 | 17 | // Change this depending on the clock cycle of your cpu. For Cervino it's 2100, for my laptop it's 2712. 18 | #define EMULATED_CPUFREQ 2300 19 | 20 | #define NS2CYCLE(__ns) ((__ns) * EMULATED_CPUFREQ / 1000) 21 | 22 | static inline void emulate_latency_ns(int ns) { 23 | uint64_t stop; 24 | uint64_t start = asm_rdtsc(); 25 | uint64_t cycles = NS2CYCLE(ns); 26 | do { 27 | // RDTSC doesn't necessarily wait for previous instructions to complete 28 | // so a serializing instruction is usually used to ensure previous 29 | // instructions have completed. However, in our case this is a desirable 30 | // property since we want to overlap the latency we emulate with the 31 | // actual latency of the emulated instruction. 32 | 33 | stop = asm_rdtsc(); 34 | } while (stop - start < cycles); 35 | } 36 | 37 | #endif -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_base_md.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 2016 Hewlett Packard Enterprise Development LP 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation, either version 3 of the 7 | * License, or (at your option) any later version. This program is 8 | * distributed in the hope that it will be useful, but WITHOUT ANY 9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 | * for more details. You should have received a copy of the GNU Lesser 12 | * General Public License along with this program. If not, see 13 | * . 14 | */ 15 | 16 | #include "makalu_internal.h" 17 | 18 | 19 | MAK_INNER word MAK_page_size = SYS_PAGESIZE; 20 | MAK_INNER struct _MAK_base_md* MAK_base_md_ptr = NULL; 21 | MAK_INNER struct obj_kind* MAK_obj_kinds = NULL; 22 | MAK_INNER int MAK_run_mode = STARTING_ONLINE; 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_base_md.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_base_md.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_block.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_block.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_hdr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_hdr.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_init.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_init.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_local_heap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_local_heap.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_malloc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_malloc.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_mark.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_mark.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_persistent.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_persistent.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_reclaim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_reclaim.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_thread.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_thread.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_transient.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_transient.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/makalu_util.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/src/makalu_util.o -------------------------------------------------------------------------------- /ext/makalu_alloc/src/test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 2016 Hewlett Packard Enterprise Development LP 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as 6 | * published by the Free Software Foundation, either version 3 of the 7 | * License, or (at your option) any later version. This program is 8 | * distributed in the hope that it will be useful, but WITHOUT ANY 9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 | * for more details. You should have received a copy of the GNU Lesser 12 | * General Public License along with this program. If not, see 13 | * . 14 | */ 15 | 16 | #include 17 | 18 | #include "makalu_internal.h" 19 | 20 | 21 | 22 | int main(){ 23 | printf("Size of hblkhdr: %lu\n", sizeof(struct hblkhdr)); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /ext/makalu_alloc/test/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | all: 3 | g++ -o test threadtest.c -I../include -L../lib -lmakalu -lpthread 4 | 5 | .PHONY: clean 6 | clean: 7 | rm -f ./test 8 | 9 | -------------------------------------------------------------------------------- /ext/makalu_alloc/test/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/ext/makalu_alloc/test/test -------------------------------------------------------------------------------- /obj/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /old/LockfreeStack.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _LOCKFREE_STACK_HPP_ 2 | #define _LOCKFREE_STACK_HPP_ 3 | 4 | #include 5 | #include "optional.hpp" 6 | #include "pm_config.hpp" 7 | #include "HazardPointers.hpp" 8 | 9 | 10 | /* 11 | * Lock-free LIFO Stack 12 | * 13 | * The paper on Hazard Pointers is named "Hazard Pointers: Safe Memory 14 | * Reclamation for Lock-Free objects" and it is available here: 15 | * http://web.cecs.pdx.edu/~walpole/class/cs510/papers/11.pdf 16 | */ 17 | 18 | template 19 | class LockfreeStack { 20 | 21 | private: 22 | struct Node { 23 | optional item; 24 | std::atomic next; 25 | 26 | Node(optional userItem = {}) : item{userItem}, next{nullptr} { } 27 | 28 | bool casNext(Node *cmp, Node *val) { 29 | return next.compare_exchange_strong(cmp, val); 30 | } 31 | 32 | }; 33 | 34 | bool casTop(Node *cmp, Node *val) { 35 | return top.compare_exchange_strong(cmp, val); 36 | } 37 | 38 | // Pointers to top of the stack 39 | alignas(CACHE_LINE_SIZE) std::atomic top; 40 | 41 | const int maxThreads; 42 | 43 | // We need one hazard pointers for pop() 44 | HazardPointers hp {1, maxThreads}; 45 | const int kHpTop = 0; 46 | 47 | public: 48 | LockfreeStack(int maxThreads=MAX_THREADS) : maxThreads{maxThreads} { 49 | top.store(nullptr, std::memory_order_relaxed); 50 | } 51 | 52 | ~LockfreeStack() { 53 | while (pop(0)); // Drain the stack 54 | } 55 | 56 | std::string className() { return "LockfreeStack"; } 57 | 58 | void push(T item, const int tid) { 59 | Node* newNode = new Node(item); 60 | while (true) { 61 | Node* ltop = top.load(); 62 | newNode->next.store(ltop); 63 | if(casTop(ltop,newNode)) return; 64 | } 65 | } 66 | 67 | optional pop(const int tid) { 68 | while(true){ 69 | Node* ltop = hp.protectPtr(kHpTop, top, tid); 70 | if(ltop != nullptr){ 71 | if(ltop != top.load()) continue;//to ensure we protect correct top 72 | Node* lnext = ltop->next.load(); 73 | if(casTop(ltop,lnext)) { 74 | T item = ltop->item.value(); // Another thread may clean up lnext after we do hp.clear() 75 | hp.clear(tid); 76 | hp.retire(ltop, tid); 77 | return item; 78 | } 79 | } else{ 80 | hp.clear(tid); 81 | return {}; 82 | } 83 | 84 | } 85 | } 86 | }; 87 | 88 | #endif -------------------------------------------------------------------------------- /old/Makefile: -------------------------------------------------------------------------------- 1 | BITS = -m64 2 | FPIC = -fPIC 3 | 4 | CC = gcc 5 | CXX = g++ 6 | 7 | CLFLAGS = -lpthread -lm -lstdc++ -std=c++11 8 | CFLAGS = -D_GNU_SOURCE -D_REENTRANT #-DDEBUG 9 | 10 | OPT = -O0 -g #-DDEBUG 11 | CFLAGS += -Wall $(BITS) -fno-strict-aliasing $(FPIC) 12 | 13 | # Rules 14 | .PHONY: all test 15 | all: libpmmalloc.a 16 | 17 | test: libpmmalloc.a 18 | $(CC) $(CFLAGS) $(OPT) hookbench.c libpmmalloc.a -lpthread -o hookbench 19 | 20 | .PHONY: clean 21 | clean: 22 | rm -f *.o *.so hookbench 23 | 24 | pmmalloc.o: pmmalloc.h pmmalloc.c queue.h 25 | $(CC) $(CFLAGS) $(OPT) -I. -c pmmalloc.c -o pmmalloc.o 26 | 27 | malloc_new.o: malloc_new.cpp pmmalloc.h 28 | $(CXX) $(CFLAGS) $(OPT) -I. -c malloc_new.cpp -o malloc_new.o 29 | 30 | libpmmalloc.a: pmmalloc.o malloc_new.o 31 | ar rcs libpmmalloc.a pmmalloc.o 32 | 33 | -------------------------------------------------------------------------------- /old/README.md: -------------------------------------------------------------------------------- 1 | This is a durably linearizable C11 implementation of Maged Michael's lock-free allocator. 2 | 3 | It's based on the repository https://github.com/qtcwt/mmalloc. 4 | 5 | One thing to be noticed that it uses RTM to solve ABA problem, so Intel x86-64 CPU newer than Haskell is required to run it. 6 | 7 | #Main Author 8 | Wentao Cai wcai6@cs.rochester.edu 9 | Feel free to send me emails about any concerns you have. -------------------------------------------------------------------------------- /old/README.old: -------------------------------------------------------------------------------- 1 | This library is an implementation of Maged Michael's algorithms as presented in 2 | his 2004 PLDI paper, "Scalable Lock-Free Dynamic Memory Allocation". 3 | 4 | --- 5 | Implementation contributors 6 | --- 7 | Scott Schneider, scschnei@cs.vt.edu 8 | Christos Antonopoulos, cda@cs.wm.edu 9 | Dimitrios Nikolopoulos, dsn@cs.vt.edu 10 | 11 | Wentao Cai, wcai6@cs.rochester.edu 12 | --- 13 | Copyright & License 14 | --- 15 | Copyright (C) 2007 Scott Schneider, Christos Antonopoulos 16 | 17 | This library is free software; you can redistribute it and/or 18 | modify it under the terms of the GNU Lesser General Public 19 | License as published by the Free Software Foundation; either 20 | version 2.1 of the License, or (at your option) any later version. 21 | 22 | This library is distributed in the hope that it will be useful, 23 | but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25 | Lesser General Public License for more details. 26 | 27 | You should have received a copy of the GNU Lesser General Public 28 | License along with this library; if not, write to the Free Software 29 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 30 | 31 | The full license can be found at: 32 | http://www.gnu.org/copyleft/lesser.html 33 | 34 | --- 35 | Notes 36 | --- 37 | - We have tried to faithfully implement Michael's allocator as he 38 | described it in his PLDI 2004 paper. However, our implementation has 39 | no page manager and performs no superblock caching. Our experiments 40 | show that these two features will significantly impact performance on 41 | some applications. 42 | 43 | Note from Wentao: 44 | The allocator is modified so that it is C11 complaint. Also, in order to avoid ABA problem, I use RTM instead of a tag so there are sufficient bits for pointers. RTM requires CPU newer than Haskell, suppose we are on Intel x86-64. 45 | -------------------------------------------------------------------------------- /old/hazard_pointer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Hazard pointer related code. 4 | * 5 | * (C) Copyright 2011 Novell, Inc 6 | * Licensed under the MIT license. See LICENSE file in the project root for full license information. 7 | */ 8 | #ifndef __HAZARD_POINTER_H__ 9 | #define __HAZARD_POINTER_H__ 10 | 11 | #include 12 | 13 | #define HAZARD_POINTER_COUNT 2 14 | 15 | typedef struct { 16 | void* hazard_pointers [HAZARD_POINTER_COUNT]; 17 | } ThreadHazardPointers; 18 | 19 | ThreadHazardPointers* hazard_pointer_get (void); 20 | void* get_hazardous_pointer (void* volatile *pp, ThreadHazardPointers *hp, int hazard_index); 21 | 22 | #define hazard_pointer_set(hp,i,v) \ 23 | do { assert ((i) >= 0 && (i) < HAZARD_POINTER_COUNT); \ 24 | (hp)->hazard_pointers [(i)] = (v); \ 25 | atomic_thread_fence(memory_order_acq_rel); \ 26 | } while (0) 27 | 28 | #define hazard_pointer_get_val(hp,i) \ 29 | ((hp)->hazard_pointers [(i)]) 30 | 31 | #define hazard_pointer_clear(hp,i) \ 32 | do { assert ((i) >= 0 && (i) < HAZARD_POINTER_COUNT); \ 33 | atomic_thread_fence(memory_order_acq_rel); \ 34 | (hp)->hazard_pointers [(i)] = NULL; \ 35 | } while (0) 36 | 37 | 38 | void thread_small_id_free (int id); 39 | int thread_small_id_alloc (void); 40 | 41 | void thread_smr_init (void); 42 | void thread_smr_cleanup (void); 43 | #endif /*__HAZARD_POINTER_H__*/ 44 | -------------------------------------------------------------------------------- /old/hookbench: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/old/hookbench -------------------------------------------------------------------------------- /old/libpmmalloc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/old/libpmmalloc.a -------------------------------------------------------------------------------- /old/lockfree_queue.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Lock free queue. 4 | * 5 | * (C) Copyright 2011 Novell, Inc 6 | * 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject to 14 | * the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | */ 27 | 28 | 29 | #ifndef LOCKFREEQUEUE_H 30 | #define LOCKFREEQUEUE_H 31 | 32 | //#define QUEUE_DEBUG 1 33 | 34 | typedef struct _LockFreeQueueNode LockFreeQueueNode; 35 | 36 | struct _LockFreeQueueNode { 37 | LockFreeQueueNode * volatile next; 38 | #ifdef QUEUE_DEBUG 39 | int32_t in_queue; 40 | #endif 41 | }; 42 | 43 | typedef struct { 44 | LockFreeQueueNode node; 45 | volatile int32_t in_use; 46 | } LockFreeQueueDummy; 47 | 48 | #define LOCK_FREE_QUEUE_NUM_DUMMIES 2 49 | 50 | typedef struct { 51 | LockFreeQueueNode * volatile head; 52 | LockFreeQueueNode * volatile tail; 53 | LockFreeQueueDummy dummies [LOCK_FREE_QUEUE_NUM_DUMMIES]; 54 | volatile int32_t has_dummy; 55 | } LockFreeQueue; 56 | 57 | void lock_free_queue_init (LockFreeQueue *q); 58 | 59 | void lock_free_queue_node_init (LockFreeQueueNode *node, int32_t poison); 60 | void lock_free_queue_node_unpoison (LockFreeQueueNode *node); 61 | 62 | void lock_free_queue_enqueue (LockFreeQueue *q, LockFreeQueueNode *node); 63 | 64 | LockFreeQueueNode* lock_free_queue_dequeue (LockFreeQueue *q); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /old/malloc_new.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/old/malloc_new.o -------------------------------------------------------------------------------- /old/pfence_util.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef PFENCE_UTIL_H 3 | #define PFENCE_UTIL_H 4 | 5 | #include 6 | 7 | // Uncomment to enable durable linearizability 8 | #define DUR_LIN 9 | 10 | #define PWB_IS_CLFLUSH 11 | 12 | #ifdef DUR_LIN 13 | #ifdef PWB_IS_CLFLUSH 14 | #define FLUSH(addr) asm volatile ("clflush (%0)" :: "r"(addr)) 15 | #define FLUSHFENCE asm volatile ("sfence" ::: "memory") 16 | #elif defined(PWB_IS_PCM) 17 | #define FLUSH(addr) emulate_latency_ns(340) 18 | #define FLUSHFENCE emulate_latency_ns(500) 19 | #else 20 | #error "Please define what PWB is." 21 | #endif /* PWB_IS_? */ 22 | #else /* !DUR_LIN */ 23 | #define FLUSH(addr) 24 | #define FLUSHFENCE 25 | #endif 26 | 27 | #define INSTRFENCE asm volatile ("" ::: "memory") 28 | 29 | /* 30 | * We copied the methods from Romulus: 31 | * https://github.com/pramalhe/Romulus 32 | */ 33 | 34 | static inline unsigned long long asm_rdtsc(void) 35 | { 36 | unsigned hi, lo; 37 | __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); 38 | return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 ); 39 | } 40 | 41 | // Change this depending on the clock cycle of your cpu. For Cervino it's 2100, for my laptop it's 2712. 42 | #define EMULATED_CPUFREQ 2300 43 | 44 | #define NS2CYCLE(__ns) ((__ns) * EMULATED_CPUFREQ / 1000) 45 | 46 | static inline void emulate_latency_ns(int ns) { 47 | uint64_t stop; 48 | uint64_t start = asm_rdtsc(); 49 | uint64_t cycles = NS2CYCLE(ns); 50 | do { 51 | /* RDTSC doesn't necessarily wait for previous instructions to complete 52 | * so a serializing instruction is usually used to ensure previous 53 | * instructions have completed. However, in our case this is a desirable 54 | * property since we want to overlap the latency we emulate with the 55 | * actual latency of the emulated instruction. 56 | */ 57 | stop = asm_rdtsc(); 58 | } while (stop - start < cycles); 59 | } 60 | 61 | #endif -------------------------------------------------------------------------------- /old/pmmalloc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/old/pmmalloc.o -------------------------------------------------------------------------------- /old/queue.c: -------------------------------------------------------------------------------- 1 | #include "queue.h" 2 | #include "rcu_tracker.h" 3 | -------------------------------------------------------------------------------- /old/queue.h: -------------------------------------------------------------------------------- 1 | #ifndef __QUEUE_H_ 2 | #define __QUEUE_H_ 3 | 4 | #include 5 | typedef struct { 6 | __uint128_t ptr:64, ocount:64; 7 | } aba_t; 8 | 9 | // Pseudostructure for lock-free list elements. 10 | // The only requirement is that the 1st-8th byte of 11 | // each element should be available to be used as 12 | // the pointer for the implementation of a singly-linked 13 | // list. 14 | struct queue_elem_t { 15 | volatile aba_t next; 16 | }; 17 | 18 | // Wentao: I don't understand why the original author put pad here. 19 | // I will just treat them as padding to avoid false-sharing so 20 | // I make them 32B in total. 21 | typedef struct { 22 | volatile uint64_t has_dummy; 23 | struct queue_elem_t dummy; 24 | volatile aba_t head; 25 | volatile aba_t tail; 26 | uint64_t _pad[2]; 27 | } lf_fifo_queue_t; 28 | 29 | #define LF_FIFO_QUEUE_STATIC_INIT {1, {{0, 0}}, {0, 0}, {0,0}, {0,0}} 30 | 31 | /******************************************************************************/ 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /old/rcu_tracker.h: -------------------------------------------------------------------------------- 1 | #ifndef RCUTRACKER_H 2 | #define RCUTRACKER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define RCU_DEBUG 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | uint64_t epoch_freq = 150; 15 | uint64_t empty_freq = 30; 16 | 17 | typedef struct _local_list_node local_list_node; 18 | 19 | struct _local_list_node{ 20 | local_list_node* next; 21 | void* ptr;//the address of the block to free 22 | uint64_t retire_epoch; 23 | } 24 | typedef struct{ 25 | local_list_node head = {NULL, NULL, 0};//dummy 26 | local_list_node* tail = &head; 27 | } local_list;// thread local list for thread local use only 28 | 29 | #ifdef RCU_DEBUG 30 | static bool initialized = false; 31 | #endif 32 | 33 | static uint64_t epoch; 34 | static uint64_t *reserve_epoch;//array in the size of thread count 35 | thread_local int op_counter;//operation count 36 | thread_local local_list retire_list; 37 | 38 | typedef void (*rcu_free_func) (void* ptr); 39 | void rcu_init(); 40 | void rcu_try_free_all(); 41 | void rcu_retire(void* ptr); 42 | void rcu_start_op(); 43 | void rcu_end_op(); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif// RCUTRACKER_H -------------------------------------------------------------------------------- /old/thread_util.cpp: -------------------------------------------------------------------------------- 1 | #include "thread_util.hpp" 2 | 3 | thread_local int tid = -1; 4 | std::atomic thread_count(0); 5 | 6 | struct thd_info{ 7 | void *(*start_routine)(void *); 8 | void* arg; 9 | thd_info(void *(*r)(void *), void* a){start_routine = r;arg=a;} 10 | }; 11 | 12 | void* func_wrapper (void *args){ 13 | thd_info* thd = (thd_info*)args; 14 | // tid = thread_count.fetch_add(1); 15 | tid = 0; 16 | void* ret = (*thd->start_routine)(thd->arg); 17 | delete thd; 18 | return ret; 19 | } 20 | 21 | int pm_thread_create (pthread_t *new_thread, 22 | const pthread_attr_t *attr, 23 | void *(*start_routine)(void *), void *arg){ 24 | thd_info* thd = new thd_info(start_routine, arg); 25 | return pthread_create(new_thread,attr,func_wrapper,thd); 26 | } 27 | 28 | int get_thread_id(){ 29 | assert(tid!=-1); 30 | return tid; 31 | } -------------------------------------------------------------------------------- /old/thread_util.hpp: -------------------------------------------------------------------------------- 1 | #ifndef THREAD_UTIL_H 2 | #define THREAD_UTIL_H 3 | 4 | #include 5 | #include 6 | #include 7 | extern thread_local int tid; 8 | extern std::atomic thread_count; 9 | 10 | extern void* func_wrapper (void *args); 11 | 12 | extern int pm_thread_create (pthread_t *new_thread, 13 | const pthread_attr_t *attr, 14 | void *(*start_routine)(void *), void *arg); 15 | 16 | extern int get_thread_id(); 17 | 18 | #endif -------------------------------------------------------------------------------- /src/AllocatorMacro.hpp: -------------------------------------------------------------------------------- 1 | ../test/benchmark/AllocatorMacro.hpp -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | # macros 2 | 3 | ## DESTROY 4 | 5 | This macro enables the option to destroy all mapping files during the exit. This 6 | might be useful for benchmarking. 7 | 8 | ## SHM_SIMULATING 9 | 10 | This macro switches Ralloc to compatible mode for machines with no real 11 | persistent memory. In this mode, ramdisk located in `/dev/shm` will be used. 12 | 13 | When this macro is not defined, allocations go to `/mnt/pmem`. If your 14 | mounting point of the persistent memory is different, then simply replace 15 | `/mnt/pmem/` by yours in `src/pm_config.hpp`. 16 | 17 | ## Test with different allocator 18 | 19 | This is controlled by following macros, but the user may want to do this by 20 | passing corresponding `ALLOC` to make (which is written in test/Makefile). 21 | 22 | ### RALLOC 23 | 24 | Run with Ralloc, a lock-free persistent allocator by University of Rochester. 25 | 26 | ### MAKALU 27 | 28 | Run with Makalu, a lock-based persistent allocator by HP Lab. 29 | 30 | ### PMDK 31 | 32 | Run with libpmemobj from PMDK, a persistent memory programming toolkit by Intel. 33 | 34 | ### otherwise 35 | directly call malloc and free. jemalloc is used by default 36 | -------------------------------------------------------------------------------- /src/SizeClass.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 University of Rochester. All rights reserved. 3 | * Licenced under the MIT licence. See LICENSE file in the project root for 4 | * details. 5 | */ 6 | 7 | /* 8 | * Copyright (C) 2018 Ricardo Leite 9 | * Licenced under the MIT licence. This file shares some portion from 10 | * LRMalloc(https://github.com/ricleite/lrmalloc) and its copyright 11 | * is retained. See LICENSE for details about MIT License. 12 | */ 13 | 14 | #include "pm_config.hpp" 15 | #include "SizeClass.hpp" 16 | 17 | // here we use same size for sbs in different sizeclass for easy management 18 | #define SIZE_CLASS_bin_yes(block_size, pages) \ 19 | { block_size, SBSIZE, SBSIZE/block_size, SBSIZE/block_size }, 20 | /* #define SIZE_CLASS_bin_yes(block_size, pages) \ 21 | { block_size, pages * PAGESIZE, 0, 0 }, 22 | */ 23 | #define SIZE_CLASS_bin_no(block_size, pages) 24 | 25 | #define SC(index, lg_grp, lg_delta, ndelta, psz, bin, pgs, lg_delta_lookup) \ 26 | SIZE_CLASS_bin_##bin(((1U << lg_grp) + (ndelta << lg_delta)), pgs) 27 | 28 | // this is reconstructed in every execution 29 | SizeClass ralloc::sizeclass; 30 | 31 | SizeClass::SizeClass(): 32 | sizeclasses{ 33 | { 0, 0, 0, 0}, 34 | SIZE_CLASSES 35 | }, 36 | sizeclass_lookup{0} { 37 | // first size class reserved for large allocations 38 | size_t lookupIdx = 0; 39 | for (size_t sc_idx = 1; sc_idx < MAX_SZ_IDX; ++sc_idx) 40 | { 41 | SizeClassData const& sc = sizeclasses[sc_idx]; 42 | size_t block_size = sc.block_size; 43 | while (lookupIdx <= block_size) 44 | { 45 | sizeclass_lookup[lookupIdx] = sc_idx; 46 | ++lookupIdx; 47 | } 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/TCache.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 University of Rochester. All rights reserved. 3 | * Licenced under the MIT licence. See LICENSE file in the project root for 4 | * details. 5 | */ 6 | 7 | /* 8 | * Copyright (C) 2018 Ricardo Leite 9 | * Licenced under the MIT licence. This file shares some portion from 10 | * LRMalloc(https://github.com/ricleite/lrmalloc) and its copyright 11 | * is retained. See LICENSE for details about MIT License. 12 | */ 13 | 14 | #include "TCache.hpp" 15 | 16 | using namespace ralloc; 17 | thread_local TCaches ralloc::t_caches; 18 | 19 | void TCacheBin::push_block(char* block) 20 | { 21 | // block has at least sizeof(char*) 22 | *(pptr*)block = _block; 23 | _block = block; 24 | _block_num++; 25 | } 26 | 27 | void TCacheBin::push_list(char* block, uint32_t length) 28 | { 29 | // caller must ensure there's no available block 30 | // this op is only used to fill empty cache 31 | assert(_block_num == 0); 32 | 33 | _block = block; 34 | _block_num = length; 35 | } 36 | 37 | char* TCacheBin::pop_block() 38 | { 39 | // caller must ensure there's an available block 40 | assert(_block_num > 0); 41 | 42 | char* ret = _block; 43 | char* next = (char*)(*(pptr*)ret); 44 | _block = next; 45 | _block_num--; 46 | return ret; 47 | } 48 | 49 | void TCacheBin::pop_list(char* block, uint32_t length) 50 | { 51 | assert(_block_num >= length); 52 | 53 | _block = block; 54 | _block_num -= length; 55 | } 56 | -------------------------------------------------------------------------------- /src/extern_val.cpp: -------------------------------------------------------------------------------- 1 | // This file defines extern variables declared in AllocatorMacro.hpp 2 | // for other allocators such as PMDK and JEMalloc 3 | #ifdef RALLOC 4 | // No extern var 5 | #elif defined(MAKALU) 6 | char *base_addr = nullptr; 7 | char *curr_addr = nullptr; 8 | #elif defined(PMDK) 9 | #include 10 | PMEMobjpool* pop = nullptr; 11 | PMEMoid root; 12 | #else 13 | void* roots[1024]; 14 | #endif -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/README.md: -------------------------------------------------------------------------------- 1 | # Interval Based Reclamation - Experimental Program 2 | 3 | By Haosen Wen, Joseph Izraelevitz, Wentao Cai, H. Alan Beadle, Michael L. Scott 4 | 5 | 6 | ## Layout 7 | 8 | ### Source 9 | 10 | * src: Source files for all experiments in the paper. 11 | * trackers: Implementations of memory managers mentioned in the paper. 12 | * rideables: Data structures for testing the memory managers. For now, all data structures are ordered maps. 13 | * ext: External library(ies). 14 | * parharness: the U of Rochester synchronization group test harness for testing parallel data structures. Released under the Apache 2.0 license. 15 | 16 | ### Generated directories 17 | 18 | Generated directories: 19 | 20 | bin: Generated executables. Organized by build configuration, 21 | so e.g. release/main is the release build. The most recent 22 | build is at the top level (bin/main). 23 | 24 | lib : Generated .so and .a files. Organized by build configuration, 25 | so e.g. release/libpolytreeX.a is the release, static library build. 26 | 27 | obj : Generated build artifacts (.o, .d, etc.). Also organized by build 28 | configuration. 29 | 30 | 31 | 32 | ## Dependencies 33 | 34 | gcc with C++11 support 35 | libjemalloc 36 | libhwloc (for parharness) 37 | 38 | 39 | 40 | ## Usage 41 | 42 | ### Compilation & Execution 43 | 44 | To compile for release: 45 | $ make 46 | 47 | To compile for debugging: 48 | $ make debug 49 | 50 | The latest executables will be in the bin directory. Use: 51 | $ bin/main -h 52 | for usage informations and currently available rideables and trackers. 53 | 54 | ### Use parharness 55 | 56 | To use parharness for repeating and customizing tests, edit and run: 57 | 58 | ext/parharness/script/testscript.py 59 | 60 | ### Draw plots 61 | 62 | We used R for drawing plots, and a sample plotting script locates in: 63 | 64 | data/scripts/genfigs.R 65 | 66 | Running: 67 | 68 | $ Rscript data/scripts/genfigs.R 69 | 70 | Will plot out the data located in: 71 | 72 | data/final/ 73 | 74 | by default. 75 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/bin/release/trivial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/bin/release/trivial -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/bonsai_linchart_retired.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/bonsai_linchart_retired.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/bonsai_linchart_throughput.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/bonsai_linchart_throughput.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/hashmap_linchart_retired.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/hashmap_linchart_retired.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/hashmap_linchart_throughput.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/hashmap_linchart_throughput.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/list_linchart_retired.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/list_linchart_retired.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/list_linchart_throughput.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/list_linchart_throughput.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/natarajan_linchart_retired.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/natarajan_linchart_retired.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/data/history_data/natarajan_linchart_throughput.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urcs-sync/ralloc/6b9d7a1af75ba75232107bfaeb6a034799d5b182/test/benchmark/Interval-Based-Reclamation/data/history_data/natarajan_linchart_throughput.pdf -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/Harness.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #ifndef HARNESS_HPP 22 | #define HARNESS_HPP 23 | 24 | 25 | #include "HarnessUtils.hpp" 26 | #include "TestConfig.hpp" 27 | #include "Rideable.hpp" 28 | #include "Recorder.hpp" 29 | #include "DefaultHarnessTests.hpp" 30 | #include "SGLQueue.hpp" 31 | #include "RContainer.hpp" 32 | #include "RMap.hpp" 33 | //#include "HazardTrackerVoid.hpp" 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/HarnessUtils.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #ifndef HARNESS_UTILS_HPP 22 | #define HARNESS_UTILS_HPP 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | // UTILITY CODE ----------------------------- 33 | void errexit (const char *err_str); 34 | void faultHandler(int sig); 35 | unsigned int nextRand(unsigned int last); 36 | int warmMemory(unsigned int megabytes); 37 | bool isInteger(const std::string & s); 38 | std::string machineName(); 39 | int archBits(); 40 | 41 | inline int64_t timeDiff(struct timeval* start, struct timeval* end){ 42 | int64_t ret = (((int64_t)end->tv_sec)-start->tv_sec)*(1000000); 43 | ret += ((int64_t)end->tv_usec)-start->tv_usec; 44 | return ret; 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/Makefile: -------------------------------------------------------------------------------- 1 | IDIR =./ 2 | CC=g++ 3 | 4 | # -DLEVEL1_DCACHE_LINESIZE detects the cache line size and passes it in as a compiler flag 5 | 6 | CFLAGS=-I$(IDIR) -I ./include -Wno-write-strings -fpermissive -pthread -std=c++0x -DLEVEL1_DCACHE_LINESIZE=`getconf LEVEL1_DCACHE_LINESIZE` 7 | 8 | # Additional options for different builds: 9 | 10 | # gcov build 11 | # -fprofile-arcs -ftest-coverage -O0 12 | # test build 13 | #-DNDEBUG -O3 14 | #debug build 15 | #-g -pg -rdynamic 16 | # line by line debug coverage (access via command line: gprof -l) 17 | #-O0 -pg -g 18 | 19 | CFLAGS+= -O3 -g 20 | 21 | ODIR=./obj 22 | LDIR =./ 23 | 24 | LIBS=-lpthread -lhwloc 25 | 26 | _DEPS = HarnessUtils.hpp ParallelLaunch.hpp RContainer.hpp TestConfig.hpp DefaultHarnessTests.hpp SGLQueue.hpp RMap.hpp ConcurrentPrimitives.hpp 27 | DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) 28 | 29 | _OBJ = ParallelLaunch.o TestConfig.o DefaultHarnessTests.o SGLQueue.o HarnessUtils.o Recorder.o 30 | OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) 31 | 32 | all: parharness library 33 | 34 | $(ODIR)/%.o: %.cpp $(DEPS) 35 | @mkdir -p $(@D) 36 | $(CC) -c -o $@ $< $(CFLAGS) 37 | 38 | 39 | 40 | parharness: $(ODIR)/Harness.o $(OBJ) 41 | g++ -o $@ $^ $(CFLAGS) $(LIBS) 42 | 43 | library: $(OBJ) 44 | ar rcs libparharness.a $(OBJ) 45 | 46 | 47 | .PHONY: clean 48 | 49 | clean: 50 | rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ parharness libparharness.a 51 | 52 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/Makefile.32: -------------------------------------------------------------------------------- 1 | IDIR =./ 2 | CC=g++ 3 | 4 | # -DLEVEL1_DCACHE_LINESIZE detects the cache line size and passes it in as a compiler flag 5 | 6 | CFLAGS=-I$(IDIR) -I ./include -I $(HOME)/.local/include -Wno-write-strings -fpermissive -pthread -std=c++0x -DLEVEL1_DCACHE_LINESIZE=`getconf LEVEL1_DCACHE_LINESIZE` -m32 7 | 8 | # Additional options for different builds: 9 | 10 | # gcov build 11 | # -fprofile-arcs -ftest-coverage -O0 12 | # test build 13 | #-DNDEBUG -O3 14 | #debug build 15 | #-g -pg -rdynamic 16 | # line by line debug coverage (access via command line: gprof -l) 17 | #-O0 -pg -g 18 | 19 | CFLAGS+= -O3 -g 20 | 21 | ODIR=./obj 22 | LDIR =./ 23 | 24 | LIBS=-lpthread -lhwloc 25 | 26 | _DEPS = HarnessUtils.hpp ParallelLaunch.hpp RContainer.hpp TestConfig.hpp DefaultHarnessTests.hpp SGLQueue.hpp RMap.hpp ConcurrentPrimitives.hpp 27 | DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) 28 | 29 | _OBJ = ParallelLaunch.o TestConfig.o DefaultHarnessTests.o SGLQueue.o HarnessUtils.o Recorder.o 30 | OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) 31 | 32 | all: parharness library 33 | 34 | $(ODIR)/%.o: %.cpp $(DEPS) 35 | @mkdir -p $(@D) 36 | $(CC) -c -o $@ $< $(CFLAGS) 37 | 38 | 39 | 40 | parharness: $(ODIR)/Harness.o $(OBJ) 41 | g++ -o $@ $^ $(CFLAGS) $(LIBS) 42 | 43 | library: $(OBJ) 44 | ar rcs libparharness.a $(OBJ) 45 | 46 | 47 | .PHONY: clean 48 | 49 | clean: 50 | rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ parharness libparharness.a 51 | 52 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/Makefile.64: -------------------------------------------------------------------------------- 1 | IDIR =./ 2 | CC=g++ 3 | 4 | # -DLEVEL1_DCACHE_LINESIZE detects the cache line size and passes it in as a compiler flag 5 | 6 | CFLAGS=-I$(IDIR) -I ./include -Wno-write-strings -fpermissive -pthread -std=c++0x -DLEVEL1_DCACHE_LINESIZE=`getconf LEVEL1_DCACHE_LINESIZE` 7 | 8 | # Additional options for different builds: 9 | 10 | # gcov build 11 | # -fprofile-arcs -ftest-coverage -O0 12 | # test build 13 | #-DNDEBUG -O3 14 | #debug build 15 | #-g -pg -rdynamic 16 | # line by line debug coverage (access via command line: gprof -l) 17 | #-O0 -pg -g 18 | 19 | CFLAGS+= -O3 -g 20 | 21 | ODIR=./obj 22 | LDIR =./ 23 | 24 | LIBS=-lpthread -lhwloc 25 | 26 | _DEPS = HarnessUtils.hpp ParallelLaunch.hpp RContainer.hpp TestConfig.hpp DefaultHarnessTests.hpp SGLQueue.hpp RMap.hpp ConcurrentPrimitives.hpp 27 | DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) 28 | 29 | _OBJ = ParallelLaunch.o TestConfig.o DefaultHarnessTests.o SGLQueue.o HarnessUtils.o Recorder.o 30 | OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) 31 | 32 | all: parharness library 33 | 34 | $(ODIR)/%.o: %.cpp $(DEPS) 35 | @mkdir -p $(@D) 36 | $(CC) -c -o $@ $< $(CFLAGS) 37 | 38 | 39 | 40 | parharness: $(ODIR)/Harness.o $(OBJ) 41 | g++ -o $@ $^ $(CFLAGS) $(LIBS) 42 | 43 | library: $(OBJ) 44 | ar rcs libparharness.a $(OBJ) 45 | 46 | 47 | .PHONY: clean 48 | 49 | clean: 50 | rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ parharness libparharness.a 51 | 52 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/ParallelLaunch.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #ifndef PARALLEL_LAUNCH_HPP 22 | #define PARALLEL_LAUNCH_HPP 23 | 24 | #ifndef _REENTRANT 25 | #define _REENTRANT 26 | #endif 27 | 28 | 29 | #include 30 | #include 31 | #include 32 | #include "HarnessUtils.hpp" 33 | #include "TestConfig.hpp" 34 | 35 | 36 | void parallelWork(GlobalTestConfig* gtc); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/RAllocator.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #ifndef RALLOCATOR_HPP 22 | #define RALLOCATOR_HPP 23 | 24 | #include 25 | #include "Rideable.hpp" 26 | 27 | #ifndef _REENTRANT 28 | #define _REENTRANT /* basic 3-lines for threads */ 29 | #endif 30 | 31 | class RAllocator : public Rideable{ 32 | public: 33 | // dequeues item from queue. Returns EMPTY if empty. 34 | // tid: Thread id, unique across all threads 35 | virtual void* allocBlock(int tid)=0; 36 | 37 | // enqueues val into queue. 38 | // tid: Thread id, unique across all threads 39 | virtual void freeBlock(void* ptr,int tid)=0; 40 | }; 41 | #endif 42 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/RMap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #ifndef RMAP_HPP 22 | #define RMAP_HPP 23 | 24 | #include 25 | #include 26 | #include 27 | #include "Rideable.hpp" 28 | #include "ConcurrentPrimitives.hpp" 29 | 30 | 31 | #ifndef _REENTRANT 32 | #define _REENTRANT /* basic 3-lines for threads */ 33 | #endif 34 | 35 | class RMap : public virtual Rideable{ 36 | public: 37 | virtual bool map(int32_t key, int32_t val, int tid)=0; 38 | //virtual int32_t search(int32_t key,int tid)=0; 39 | virtual int32_t unmap(int32_t key,int tid)=0; 40 | 41 | virtual int32_t get(int32_t key, int tid)=0; 42 | 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/Rideable.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #ifndef RIDEABLE_HPP 22 | #define RIDEABLE_HPP 23 | 24 | #include 25 | #include "TestConfig.hpp" 26 | 27 | #ifndef _REENTRANT 28 | #define _REENTRANT /* basic 3-lines for threads */ 29 | #endif 30 | 31 | 32 | class GlobalTestConfig; 33 | 34 | class Rideable{ 35 | public: 36 | virtual ~Rideable(){}; 37 | }; 38 | 39 | 40 | class Reportable{ 41 | public: 42 | virtual void introduce(){}; 43 | virtual void conclude(){}; 44 | }; 45 | 46 | class RideableFactory{ 47 | public: 48 | virtual Rideable* build(GlobalTestConfig* gtc)=0; 49 | virtual ~RideableFactory(){}; 50 | }; 51 | #endif 52 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/SGLQueue.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #include "SGLQueue.hpp" 22 | #include 23 | #include 24 | #include 25 | 26 | SGLQueue::SGLQueue(){ 27 | q = new std::list(); 28 | lk.store(-1,std::memory_order::memory_order_release); 29 | } 30 | SGLQueue::~SGLQueue(){} 31 | 32 | int32_t SGLQueue::dequeue(int tid){ 33 | lockAcquire(tid); 34 | int32_t v=0; 35 | if(!q->empty()){ 36 | v = q->front(); 37 | q->pop_front(); 38 | } 39 | else{v=EMPTY;} 40 | lockRelease(tid); 41 | return v; 42 | } 43 | 44 | void SGLQueue::enqueue(int32_t val,int tid){ 45 | lockAcquire(tid); 46 | q->push_back(val); 47 | lockRelease(tid); 48 | } 49 | 50 | // Simple test and set lock 51 | /// There are better ways to do this... 52 | void SGLQueue::lockAcquire(int32_t tid){ 53 | int unlk = -1; 54 | while(!lk.compare_exchange_strong(unlk, tid,std::memory_order::memory_order_acq_rel)){ 55 | unlk = -1; // compare_exchange puts the old value into unlk, so set it back 56 | } 57 | assert(lk.load()==tid); 58 | } 59 | 60 | void SGLQueue::lockRelease(int32_t tid){ 61 | assert(lk==tid); 62 | int unlk = -1; 63 | lk.store(unlk,std::memory_order::memory_order_release); 64 | } 65 | 66 | 67 | SGLQueue::SGLQueue(std::list* contents){ 68 | lk.store(-1,std::memory_order::memory_order_release); 69 | q = new std::list(); 70 | q->assign(contents->begin(),contents->end()); 71 | } 72 | 73 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/SGLQueue.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | #ifndef SGL_QUEUE 22 | #define SGL_QUEUE 23 | 24 | #ifndef _REENTRANT 25 | #define _REENTRANT 26 | #endif 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include "RContainer.hpp" 33 | 34 | class SGLQueue : public RQueue{ 35 | 36 | private: 37 | void lockAcquire(int32_t tid); 38 | void lockRelease(int32_t tid); 39 | 40 | std::list* q=NULL; 41 | std::atomic lk; 42 | 43 | 44 | public: 45 | SGLQueue(); 46 | ~SGLQueue(); 47 | SGLQueue(std::list* contents); 48 | 49 | int32_t dequeue(int tid); 50 | void enqueue(int32_t val,int tid); 51 | 52 | }; 53 | 54 | class SGLQueueFactory : public RContainerFactory{ 55 | SGLQueue* build(GlobalTestConfig* gtc){ 56 | return new SGLQueue(); 57 | } 58 | }; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/TODO.txt: -------------------------------------------------------------------------------- 1 | TODO's for parharness 2 | 3 | Standardize naming convention 4 | Standardize end lines 5 | Remove three lines for threads 6 | 7 | 8 | TODO's for make 9 | Rebuild if dependent .a is changed -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/cycle1.cs.rochester.edu.aff: -------------------------------------------------------------------------------- 1 | ORDERED 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/cycle2.cs.rochester.edu.aff: -------------------------------------------------------------------------------- 1 | EVEN_ODDS_LOW_HI 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/even_odds.aff: -------------------------------------------------------------------------------- 1 | EVEN_ODDS 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/even_odds_lo_hi.aff: -------------------------------------------------------------------------------- 1 | EVEN_ODDS_LOW_HI 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/node2x18a.cs.rochester.edu.aff: -------------------------------------------------------------------------------- 1 | EVEN_ODDS 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/ordered.aff: -------------------------------------------------------------------------------- 1 | ORDERED 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/single.aff: -------------------------------------------------------------------------------- 1 | SINGLE 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/affinity/ubuntu.aff: -------------------------------------------------------------------------------- 1 | ORDERED 2 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/gccLeaks.supp: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Leak 4 | ... 5 | obj:/usr/lib32/libstdc++.so* 6 | ... 7 | } 8 | { 9 | 10 | Memcheck:Leak 11 | ... 12 | obj:/usr/lib/libstdc++.so* 13 | ... 14 | } 15 | { 16 | 17 | Memcheck:Leak 18 | ... 19 | fun:*_Rb_tree_iterator* 20 | ... 21 | } 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/license-header.txt: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2015 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/license.sh: -------------------------------------------------------------------------------- 1 | for i in *.py # or whatever other pattern... 2 | do 3 | if ! grep -q Copyright $i 4 | then 5 | cat license-header.txt $i >$i.new && mv $i.new $i 6 | fi 7 | done 8 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/scripts/bonsai_intr_RCU.csv: -------------------------------------------------------------------------------- 1 | affinity,archbits,cores,datetime,environment,interval,language,machine,notes,ops,ops_each,ops_stddev,preheated(MBs),rideable,test,threads 2 | ,64,72,22-05-2017 11:21:46,,10,C++,node2x18a.cs.rochester.edu,,3289392,3289392:,0,3,BonsaiTreeRCU,MapChurn:g50i50:range=65536:prefill=1024 (ASCYLIB's map test),1 3 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/ext/parharness/scripts/repeat.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | 4 | # Copyright 2015 University of Rochester 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | 19 | 20 | import sys 21 | from os.path import dirname, realpath, sep, pardir 22 | import shutil 23 | import csv 24 | from argparse import ArgumentParser 25 | from subprocess import call 26 | import os 27 | 28 | os.environ['PATH'] = dirname(realpath(__file__))+\ 29 | ":" + os.environ['PATH'] # scripts 30 | 31 | if __name__ == "__main__": 32 | retVal = 0 33 | while(retVal==0): 34 | cmd = " " 35 | cmd = cmd.join(sys.argv[1:]) 36 | print cmd 37 | retVal = os.system(cmd) 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/src/CustomTests.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | #include "CustomTests.hpp" 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | using namespace std; 31 | 32 | 33 | 34 | void DebugTest::init(GlobalTestConfig* gtc){ 35 | Rideable* ptr = gtc->allocRideable(); 36 | this->m = dynamic_cast*>(ptr); 37 | if (!m) { 38 | errexit("DebugTest must be run on RUnorderedMap type object."); 39 | } 40 | if (gtc->task_num > 1){ 41 | errexit("DebugTest only support single thread."); 42 | } 43 | 44 | cout<<"Hello from DebugTest::init"<get(key, tid).has_value()){ 51 | cout<<"key "<get(key, tid).value()<<"'"<"<put(key, value, tid); 59 | cout<<"get '"<get(key, tid).value()<<"'"<remove(key, tid); 64 | cout<<"get '"<get(key, tid).value()<<"'"<tid; 68 | 69 | put_get("b", "b", tid); 70 | put_get("c", "c", tid); 71 | m->remove("c", tid); 72 | get("c", tid); 73 | 74 | return 0; 75 | } 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/src/RUnorderedMap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | #ifndef RUNORDEREDMAP_HPP 21 | #define RUNORDEREDMAP_HPP 22 | 23 | #include 24 | #include "Rideable.hpp" 25 | 26 | #include "optional.hpp" 27 | 28 | template class RUnorderedMap : public virtual Rideable{ 29 | public: 30 | 31 | // Gets value corresponding to a key 32 | // returns : the most recent value set for that key 33 | virtual optional get(K key, int tid)=0; 34 | 35 | // Puts a new key/value pair into the map 36 | // returns : the previous value for this key, 37 | // or NULL if no such value exists 38 | virtual optional put(K key, V val, int tid)=0; 39 | 40 | // Inserts a new key/value pair into the map 41 | // if the key is not already present 42 | // returns : true if the insert is successful, false otherwise 43 | virtual bool insert(K key, V val, int tid)=0; 44 | 45 | // Removes a value corresponding to a key 46 | // returns : the removed value 47 | virtual optional remove(K key, int tid)=0; 48 | 49 | // Replaces the value corresponding to a key 50 | // if the key is already present in the map 51 | // returns : the replaced value, or NULL if replace was unsuccessful 52 | virtual optional replace(K key, V val, int tid)=0; 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/src/RetiredMonitorable.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 University of Rochester 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | 19 | 20 | #ifndef RETIREDMONITORABLE_HPP 21 | #define RETIREDMONITORABLE_HPP 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include "ConcurrentPrimitives.hpp" 28 | #include "RAllocator.hpp" 29 | 30 | class RetiredMonitorable{ 31 | public: 32 | padded* retired_cnt; 33 | RetiredMonitorable(GlobalTestConfig* gtc){ 34 | retired_cnt = new padded[gtc->task_num]; 35 | } 36 | void collect_retired_size(uint64_t size, int tid){ 37 | retired_cnt[tid].ui += size; 38 | } 39 | uint64_t report_retired(int tid){ 40 | return retired_cnt[tid].ui; 41 | } 42 | }; 43 | 44 | #endif -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/src/rideables/README.md: -------------------------------------------------------------------------------- 1 | Each data structure consists of at least a .hpp file 2 | and (usually) a matching .cpp file. Brief descriptions 3 | follow below. 4 | 5 | ### SGLUnorderedMap 6 | 7 | A std::unordered_map protected by a TAS lock. 8 | 9 | ### SortedUnorderedMap 10 | 11 | A 1000000-bucket list-based hash map according to 12 | Michelle[2002]. In each bucket, nodes are kept in order 13 | by their keys. 14 | 15 | Two versions included. Range version for TagIBR and 16 | the basic version for others. 17 | 18 | ### LinkList 19 | 20 | A 1-bucket SortedUnorderedMap. In each bucket, 21 | nodes are kept in order by their keys. 22 | 23 | Two versions included. Range version for TagIBR and 24 | the basic version for others. 25 | 26 | ### NatarajanTree 27 | 28 | A lock-free Binary Search Tree according to 29 | Natarajan[2014]. It is an ordered map. 30 | 31 | Two versions included. Range version for TagIBR and 32 | the basic version for others. 33 | 34 | ### BonsaiTree 35 | 36 | A state-based lock-free Binary Search Tree, an ordered 37 | map. Every write operation creates a new state and 38 | rebuild the whole tree. Reads are wait-free. The 39 | prototype of Bonsai Tree is by A. T. Clements in 40 | ASPLOS'12. 41 | 42 | Two versions included. Range version for TagIBR and 43 | the basic version for others. -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/src/trackers/AllocatorMacro.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ALLOCATOR_MACRO 2 | #define ALLOCATOR_MACRO 3 | 4 | #include "ralloc.hpp" 5 | #define PM_start(id) RP_init(id) 6 | #define PM_close() RP_close() 7 | #define PM_recover() RP_recover() 8 | #define PM_malloc(sz) RP_malloc(sz) 9 | #define PM_free(ptr) RP_free(ptr) 10 | #define set_root(ptr, i) RP_set_root(ptr, i) 11 | #define get_root(i) RP_get_root(i) 12 | 13 | #endif -------------------------------------------------------------------------------- /test/benchmark/Interval-Based-Reclamation/src/trackers/README.md: -------------------------------------------------------------------------------- 1 | All memory managers (trackers) appears here: 2 | 3 | ##Our implementations of previous works: 4 | 5 | ###Hazard Tracker 6 | 7 | Hazard Pointers by Maged Michael (2004). 8 | 9 | ###RCU Tracker 10 | 11 | An improved version of RCU memory management, an epoch-based tracker. 12 | 13 | ###HE Tracker 14 | 15 | Hazard Eras by Pedro Ramalhete and Andreia Correia (2017). 16 | 17 | 18 | ##New approaches from our paper: 19 | 20 | ###Interval Tracker 21 | 22 | "POIBR" in the paper. 23 | 24 | ###Range Tracker 25 | 26 | "TagIBR" and "TagIBR-FAA" in the paper. 27 | 28 | ###Range Tracker (new) 29 | 30 | "2GEIBR" in the paper 31 | 32 | 33 | ##Other infrastructures 34 | 35 | ###biptr 36 | 37 | An implementation of the tagged pointer in the paper. 38 | 39 | ###Memory Tracker / Base Tracker 40 | 41 | Wrapper and Base classes for switching memory managers at run time. 42 | -------------------------------------------------------------------------------- /test/benchmark/fred.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | #ifndef HL_FRED_H 4 | #define HL_FRED_H 5 | 6 | /// A thread-wrapper of childlike simplicity :). 7 | 8 | #include 9 | #include 10 | #ifdef RALLOC 11 | #include "ralloc.hpp" 12 | #elif defined (MAKALU) 13 | #include "makalu.h" 14 | #endif 15 | 16 | typedef void * (*ThreadFunctionType) (void *); 17 | 18 | namespace HL { 19 | 20 | class Fred { 21 | public: 22 | 23 | Fred() { 24 | pthread_attr_init (&attr); 25 | pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); 26 | } 27 | 28 | ~Fred() { 29 | pthread_attr_destroy (&attr); 30 | } 31 | 32 | void create (ThreadFunctionType function, void * arg) { 33 | #ifdef RALLOC 34 | pthread_create (&t, &attr, function, arg); 35 | #elif defined (MAKALU) 36 | MAK_pthread_create (&t, &attr, function, arg); 37 | #else 38 | pthread_create (&t, &attr, function, arg); 39 | #endif 40 | } 41 | 42 | void join (void) { 43 | pthread_join (t, NULL); 44 | } 45 | 46 | static void yield (void) { 47 | sched_yield(); 48 | } 49 | 50 | 51 | static void setConcurrency (int n) { 52 | pthread_setconcurrency (n); 53 | } 54 | 55 | 56 | private: 57 | typedef pthread_t FredType; 58 | pthread_attr_t attr; 59 | 60 | FredType t; 61 | }; 62 | 63 | } 64 | 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /test/larson-single.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -lt 1 ]]; then 4 | echo "usage: larson-single.sh " 5 | echo "" 6 | echo "wraps a single run of larson with rss sampling" 7 | echo "" 8 | echo "example:" 9 | echo " ./larson-single.sh 1" 10 | exit 1 11 | fi 12 | 13 | if [[ $# -ne 2 ]]; then 14 | ALLOC="r" 15 | else 16 | ALLOC=$2 17 | fi 18 | 19 | BINARY=./larson_test 20 | if [ "$ALLOC" == "je" ]; then 21 | BINARY="numactl --membind=2 "${BINARY} 22 | fi 23 | 24 | THREADS=$1 25 | 26 | rm -f /tmp/larson 27 | $BINARY 30 64 400 1000 10000 123 $THREADS > /tmp/larson 28 | 29 | while read line; do 30 | if [[ $line == *"Throughput"* ]]; then 31 | ops=$(echo $line | awk '{print $3}') 32 | break 33 | fi 34 | done < /tmp/larson 35 | 36 | echo "{ \"threads\": $THREADS , \"ops\": $ops , \"allocator\": $ALLOC}" 37 | echo "$THREADS,$ops,$ALLOC" >> larson.csv 38 | -------------------------------------------------------------------------------- /test/old/active-false-single.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -ne 1 ]]; then 4 | echo "usage: active-false-single.sh " 5 | echo "" 6 | echo "wraps a single run of active-false aka cache-thrash" 7 | echo "" 8 | echo "example:" 9 | echo " ./active-false-single.sh 1 " 10 | exit 1 11 | fi 12 | 13 | BINARY=./cache-thrash_test 14 | THREADS=$1 15 | rm -f /tmp/cache-thrash 16 | $BINARY $THREADS 1000 8 1000000 2>&1 > /tmp/cache-thrash & 17 | pid=$! 18 | 19 | renice -n 19 -p $$ > /dev/null 20 | 21 | while true ; do 22 | while read line; do 23 | if [[ $line == *"elapsed"* ]]; then 24 | t=$(echo $line | awk '{print $4}') 25 | break 2 26 | fi 27 | done < /tmp/cache-thrash 28 | done 29 | 30 | echo "{ \"threads\": $THREADS , \"time\": $t }" 31 | echo "$THREADS, $t" >> act.csv -------------------------------------------------------------------------------- /test/old/base_meta_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "RegionManager.hpp" 5 | #include "BaseMeta.hpp" 6 | 7 | 8 | int main(){ 9 | RegionManager* mgr; 10 | BaseMeta* base_md; 11 | if(RegionManager::exists_test("/dev/shm/test")){ 12 | cout<<"/dev/shm/test exist, testing remap..."; 13 | mgr = new RegionManager("/dev/shm/test"); 14 | void* hstart = mgr->__fetch_heap_start(); 15 | base_md = (BaseMeta*) hstart; 16 | base_md->set_mgr(mgr); 17 | assert(base_md->get_root(0)==(void*)0xff00); 18 | assert(base_md->get_root(1)==(void*)0xfff1); 19 | } else { 20 | cout<<"create new RegionManager in /dev/shm/test..."; 21 | mgr = new RegionManager("/dev/shm/test"); 22 | int res = mgr->__nvm_region_allocator((void**)&base_md,sizeof(void*),sizeof(BaseMeta)); 23 | if(res!=0) assert(0&&"mgr allocation fails!"); 24 | mgr->__store_heap_start(base_md); 25 | new (base_md) BaseMeta(mgr, 1); 26 | base_md->set_root((void*)0xff00,0); 27 | base_md->set_root((void*)0xfff1,1); 28 | base_md->new_space(0);//desc 29 | base_md->new_space(1);//small sb 30 | base_md->new_space(2);//large sb 31 | } 32 | delete mgr; 33 | cout<<"done!\n"; 34 | return 0; 35 | } -------------------------------------------------------------------------------- /test/old/passive-false-single.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -ne 1 ]]; then 4 | echo "usage: passive-false-single.sh " 5 | echo "" 6 | echo "wraps a single run of passive-false aka cache-scratch" 7 | echo "" 8 | echo "example:" 9 | echo " ./passive-false-single.sh 1 " 10 | exit 1 11 | fi 12 | 13 | BINARY=./cache-scratch_test 14 | THREADS=$1 15 | rm -f /tmp/cache-scratch 16 | $BINARY $THREADS 1000 8 1000000 2>&1 > /tmp/cache-scratch & 17 | pid=$! 18 | 19 | renice -n 19 -p $$ > /dev/null 20 | 21 | while true ; do 22 | while read line; do 23 | if [[ $line == *"elapsed"* ]]; then 24 | t=$(echo $line | awk '{print $4}') 25 | break 2 26 | fi 27 | done < /tmp/cache-scratch 28 | done 29 | 30 | echo "{ \"threads\": $THREADS , \"time\": $t }" 31 | 32 | echo "$THREADS, $t" >> pas.csv 33 | -------------------------------------------------------------------------------- /test/old/region_manager_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "RegionManager.hpp" 5 | 6 | int main(){ 7 | if(RegionManager::exists_test("/dev/shm/test")){ 8 | cout<<"/dev/shm/test exist, testing remap..."; 9 | RegionManager* mgr = new RegionManager("/dev/shm/test"); 10 | delete mgr; 11 | cout<<"done!\n"; 12 | } else { 13 | cout<<"create new RegionManager in /dev/shm/test..."; 14 | RegionManager* mgr = new RegionManager("/dev/shm/test"); 15 | delete mgr; 16 | cout<<"done!\n"; 17 | } 18 | return 0; 19 | } -------------------------------------------------------------------------------- /test/old/rpmalloc_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "ralloc.hpp" 7 | // #include "thread_util.hpp" 8 | 9 | using namespace std; 10 | 11 | const int THREAD_NUM = 4; 12 | // ralloc* alloc; 13 | atomic start{false}; 14 | 15 | void *malloc_free_loop(void *args) { 16 | while(!start.load()); 17 | int iters = *((int*)args); 18 | int **p = RP_malloc(iters*sizeof(int*)); 19 | int ret = 1; 20 | for (int i = 0; i < iters; i++) { 21 | p[i] = RP_malloc(sizeof(int)); 22 | *p[i] = i; 23 | ret=*p[i]+1; 24 | if (i%100000==0) fprintf(stderr,"%p: %d\n",p[i],*p[i]); 25 | } 26 | for(int i=0;i> act.csv 7 | for i in {1..3} 8 | do 9 | rm -rf /dev/shm/* 10 | ./active-false-single.sh 1 11 | rm -rf /dev/shm/* 12 | ./active-false-single.sh 2 13 | rm -rf /dev/shm/* 14 | ./active-false-single.sh 4 15 | rm -rf /dev/shm/* 16 | ./active-false-single.sh 8 17 | rm -rf /dev/shm/* 18 | ./active-false-single.sh 16 19 | rm -rf /dev/shm/* 20 | ./active-false-single.sh 32 21 | rm -rf /dev/shm/* 22 | ./active-false-single.sh 48 23 | rm -rf /dev/shm/* 24 | ./active-false-single.sh 64 25 | rm -rf /dev/shm/* 26 | ./active-false-single.sh 72 27 | rm -rf /dev/shm/* 28 | ./active-false-single.sh 80 29 | done 30 | cp act.csv ../data/act.csv -------------------------------------------------------------------------------- /test/old/run_pas_false.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make clean 4 | make cache-scratch_test 5 | rm -rf pas.csv 6 | echo "thread, time" >> pas.csv 7 | for i in {1..3} 8 | do 9 | rm -rf /dev/shm/* 10 | ./passive-false-single.sh 1 11 | rm -rf /dev/shm/* 12 | ./passive-false-single.sh 2 13 | rm -rf /dev/shm/* 14 | ./passive-false-single.sh 4 15 | rm -rf /dev/shm/* 16 | ./passive-false-single.sh 8 17 | rm -rf /dev/shm/* 18 | ./passive-false-single.sh 16 19 | rm -rf /dev/shm/* 20 | ./passive-false-single.sh 32 21 | rm -rf /dev/shm/* 22 | ./passive-false-single.sh 48 23 | rm -rf /dev/shm/* 24 | ./passive-false-single.sh 64 25 | rm -rf /dev/shm/* 26 | ./passive-false-single.sh 72 27 | rm -rf /dev/shm/* 28 | ./passive-false-single.sh 80 29 | done 30 | cp pas.csv ../data/pas.csv -------------------------------------------------------------------------------- /test/old/trivial_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | struct _test{ 5 | int a[10]; 6 | }; 7 | 8 | struct _16atomic{ 9 | uint32_t index; 10 | uint64_t value; 11 | uint32_t counter; 12 | _16atomic(uint32_t a=0, uint64_t b=0, uint32_t c=0): 13 | index(a), 14 | value(b), 15 | counter(c){}; 16 | }; 17 | 18 | template 19 | struct _12atomic{ 20 | T value; 21 | uint32_t counter; 22 | _12atomic(T b=0, uint32_t c=0) noexcept: 23 | value(b), 24 | counter(c){}; 25 | }; 26 | 27 | int main() { 28 | cout<<"size of _test: "<> t[10]; 36 | _12atomic new_val{~(uint64_t)0,464564353}; 37 | cout<<"sizeof 12atomic: "<)<: "<)<" 5 | echo "" 6 | echo "wraps a single run of prod-con with rss sampling" 7 | echo "" 8 | echo "example:" 9 | echo " ./prod-con-single.sh 2" 10 | exit 1 11 | fi 12 | 13 | if [[ $# -ne 2 ]]; then 14 | ALLOC="r" 15 | else 16 | ALLOC=$2 17 | fi 18 | 19 | BINARY=./prod-con_test 20 | if [ "$ALLOC" == "je" ]; then 21 | BINARY="numactl --membind=2 "${BINARY} 22 | fi 23 | 24 | THREADS=$1 25 | 26 | rm -f /tmp/prod-con 27 | $BINARY $THREADS 10000000 64 > /tmp/prod-con 28 | 29 | while read line; do 30 | if [[ $line == *"Time elapsed"* ]]; then 31 | exec_time=$(echo $line | awk '{print $4}') 32 | break 33 | fi 34 | done < /tmp/prod-con 35 | 36 | echo "{ \"threads\": $THREADS , \"time\": $exec_time , \"allocator\": $ALLOC}" 37 | echo "$THREADS,$exec_time,$ALLOC" >> prod-con.csv 38 | -------------------------------------------------------------------------------- /test/run_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # traditional allocator benchmarks from Hoard 3 | for alloc in "lr" "r" "mak" "pmdk" # "je" 4 | do 5 | ./run_larson.sh $alloc 6 | ./run_shbench.sh $alloc 7 | ./run_threadtest.sh $alloc 8 | # testing producer-consumer pattern 9 | ./run_prod-con.sh $alloc 10 | # testing Redis TODO 11 | # testing GC time consumption 12 | #./run_resur.sh 13 | done 14 | -------------------------------------------------------------------------------- /test/run_larson.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $# -ne 1 ]]; then 3 | ALLOC="r" 4 | else 5 | ALLOC=$1 6 | fi 7 | ARGS="ALLOC=" 8 | ARGS=${ARGS}${ALLOC} 9 | echo $ARGS 10 | 11 | make clean 12 | make larson_test ${ARGS} 13 | rm -rf larson.csv 14 | echo "thread,ops,allocator" >> larson.csv 15 | for i in {1..3} 16 | do 17 | for threads in 1 2 4 6 10 16 20 24 32 40 48 62 72 80 84 88 18 | do 19 | rm -rf /mnt/pmem/* 20 | ./larson-single.sh $threads $ALLOC 21 | done 22 | done 23 | # SEDARGS="2,\$s/$/" 24 | # SEDARGS=${SEDARGS}","${ALLOC}"/" 25 | # echo $SEDARGS 26 | # sed ${SEDARGS} -i larson.csv 27 | NAME="../data/larson/larson_"${ALLOC}".csv" 28 | cp larson.csv ${NAME} 29 | -------------------------------------------------------------------------------- /test/run_prod-con.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $# -ne 1 ]]; then 3 | ALLOC="r" 4 | else 5 | ALLOC=$1 6 | fi 7 | ARGS="ALLOC=" 8 | ARGS=${ARGS}${ALLOC} 9 | echo $ARGS 10 | 11 | make clean 12 | make prod-con_test ${ARGS} 13 | rm -rf prod-con.csv 14 | echo "thread,exec_time,allocator" >> prod-con.csv 15 | for i in {1..3} 16 | do 17 | for threads in 2 4 6 10 16 20 24 32 40 48 62 72 80 84 88 18 | do 19 | rm -rf /mnt/pmem/* 20 | ./prod-con-single.sh $threads $ALLOC 21 | done 22 | done 23 | # SEDARGS="2,\$s/$/" 24 | # SEDARGS=${SEDARGS}","${ALLOC}"/" 25 | # sed ${SEDARGS} -i prod-con.csv 26 | NAME="../data/prod-con/prod-con_"${ALLOC}".csv" 27 | cp prod-con.csv ${NAME} 28 | -------------------------------------------------------------------------------- /test/run_resur.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make clean;make threadtest_test 4 | cd benchmark/Interval-Based-Reclamation; make clean;make; 5 | echo "reachable_blocks, prefill_time(ms), gc_time(ms)" >> resur.csv 6 | for i in {1..3} 7 | do 8 | for MODE in {0..5} 9 | do 10 | rm -rf /dev/shm/* 11 | ./bin/intmain -r3 -m$MODE -i0 -v > /tmp/resur 12 | while read line; do 13 | if [[ $line == *"Prefill time"* ]]; then 14 | prefill_time=$(echo $line | awk '{print $4}') 15 | break 16 | fi 17 | done < /tmp/resur 18 | 19 | ./bin/intmain -r3 -m$MODE -i0 -v > /tmp/resur 20 | while read line; do 21 | if [[ $line == *"Time elapsed"* ]]; then 22 | gc_time=$(echo $line | awk '{print $4}') 23 | fi 24 | if [[ $line == *"Reachable blocks"* ]]; then 25 | reachable=$(echo $line | awk '{print $4}') 26 | fi 27 | done < /tmp/resur 28 | echo "{ \"reachable blocks\": $reachable , \"prefill_time\": $prefill_time , \"gc_time\": $gc_time }" 29 | echo "$reachable, $prefill_time, $gc_time" >> resur.csv 30 | done 31 | done 32 | cp resur.csv ../../../data/resur.csv 33 | cd - 34 | -------------------------------------------------------------------------------- /test/run_shbench.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $# -ne 1 ]]; then 3 | ALLOC="r" 4 | else 5 | ALLOC=$1 6 | fi 7 | ARGS="ALLOC=" 8 | ARGS=${ARGS}${ALLOC} 9 | echo $ARGS 10 | 11 | make clean 12 | make sh6bench_test ${ARGS} 13 | rm -rf shbench.csv 14 | echo "thread,exec_time,allocator" >> shbench.csv 15 | for i in {1..3} 16 | do 17 | for threads in 1 2 4 6 10 16 20 24 32 40 48 62 72 80 84 88 18 | do 19 | rm -rf /mnt/pmem/* 20 | sleep 1 21 | ./shbench-single.sh $threads $ALLOC 22 | done 23 | done 24 | # SEDARGS="2,\$s/$/" 25 | # SEDARGS=${SEDARGS}","${ALLOC}"/" 26 | # echo $SEDARGS 27 | # sed ${SEDARGS} -i shbench.csv 28 | NAME="../data/shbench/shbench_"${ALLOC}".csv" 29 | cp shbench.csv ${NAME} 30 | -------------------------------------------------------------------------------- /test/run_threadtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $# -ne 1 ]]; then 3 | ALLOC="r" 4 | else 5 | ALLOC=$1 6 | fi 7 | ARGS="ALLOC=" 8 | ARGS=${ARGS}${ALLOC} 9 | echo $ARGS 10 | make clean 11 | make threadtest_test ${ARGS} 12 | rm -rf threadtest.csv 13 | echo "thread,exec_time,allocator" >> threadtest.csv 14 | for i in {1..3} 15 | do 16 | for threads in 1 2 4 6 10 16 20 24 32 40 48 62 72 80 84 88 17 | do 18 | rm -rf /mnt/pmem/* 19 | ./threadtest-single.sh $threads $ALLOC 20 | done 21 | done 22 | # SEDARGS="2,\$s/$/" 23 | # SEDARGS=${SEDARGS}","${ALLOC}"/" 24 | # echo $SEDARGS 25 | # sed ${SEDARGS} -i threadtest.csv 26 | NAME="../data/threadtest/threadtest_"${ALLOC}".csv" 27 | cp threadtest.csv ${NAME} 28 | -------------------------------------------------------------------------------- /test/shbench-single.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -lt 1 ]]; then 4 | echo "usage: shbench-single.sh " 5 | echo "" 6 | echo "wraps a single run of shbench with rss sampling" 7 | echo "" 8 | echo "example:" 9 | echo " ./shbench-single.sh 1" 10 | exit 1 11 | fi 12 | 13 | if [[ $# -ne 2 ]]; then 14 | ALLOC="r" 15 | else 16 | ALLOC=$2 17 | fi 18 | 19 | BINARY=./sh6bench_test 20 | if [ "$ALLOC" == "je" ]; then 21 | BINARY="numactl --membind=2 "${BINARY} 22 | fi 23 | 24 | THREADS=$1 25 | 26 | PARAMS=/tmp/shbench_params 27 | echo "100000" > $PARAMS 28 | echo "64" >> $PARAMS 29 | echo "400" >> $PARAMS 30 | echo "$THREADS" >> $PARAMS 31 | 32 | rm -f /tmp/shbench 33 | $BINARY < $PARAMS > /tmp/shbench 34 | 35 | while read line; do 36 | if [[ $line == *"rdtsc time"* ]]; then 37 | exec_time=$(echo $line | awk '{print $3}') 38 | break 39 | fi 40 | done < /tmp/shbench 41 | 42 | echo "{ \"threads\": $THREADS , \"time\": $exec_time , \"allocator\": $ALLOC }" 43 | echo "$THREADS,$exec_time,$ALLOC" >> shbench.csv 44 | -------------------------------------------------------------------------------- /test/threadtest-single.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -lt 1 ]]; then 4 | echo "usage: threadtest-single.sh " 5 | echo "" 6 | echo "wraps a single run of threadtest with rss sampling" 7 | echo "" 8 | echo "example:" 9 | echo " ./threadtest-single.sh 1 " 10 | exit 1 11 | fi 12 | 13 | if [[ $# -ne 2 ]]; then 14 | ALLOC="r" 15 | else 16 | ALLOC=$2 17 | fi 18 | 19 | BINARY=./threadtest_test 20 | if [ "$ALLOC" == "je" ]; then 21 | BINARY="numactl --membind=2 "${BINARY} 22 | fi 23 | 24 | THREADS=$1 25 | 26 | rm /tmp/threadtest 27 | $BINARY $THREADS 10000 100000 0 8 > /tmp/threadtest 28 | 29 | while read line; do 30 | if [[ $line == *"Time elapsed"* ]]; then 31 | exec_time=$(echo $line | awk '{print $4}') 32 | break 33 | fi 34 | done < /tmp/threadtest 35 | 36 | echo "{ \"threads\": $THREADS , \"time\": $exec_time , \"allocator\": $ALLOC}" 37 | echo "$THREADS,$exec_time,$ALLOC" >> threadtest.csv 38 | --------------------------------------------------------------------------------