Coder Social home page Coder Social logo

chiwenlin / supermalloc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sysprog21/supermalloc

0.0 2.0 0.0 4.89 MB

A Super Fast Multithreaded malloc() for 64-bit Machines

License: Other

Emacs Lisp 0.01% C++ 12.60% C 4.01% Makefile 1.65% TeX 77.39% Gnuplot 4.26% Perl 0.05% Objective-C 0.04% Shell 0.02%

supermalloc's Introduction

To build for release

 cd release
 make
 make check

  You get two libraries in release/lib
    libsupermalloc.so             requires transactional memory (haswell)
    libsupermalloc_pthread.so     uses pthread locks
  I plan to add a runtime check and have only one library and an enviroment variable in the future.

------

You should also build and check with the internal testing code
enabled.  It's a different library partly because of link-time
optimization.  Also, if you want things easier to compile.  There are
two differences, we enable the TESTING flag (which includes a bunch of
code that can be compiled) and we set -O0.

 cd debug
 make check

-------
To run code coverage 
 cd coverage
 make check

-------
At top level you can do
 make clean
 make
 make check

-------

Installing jemalloc-3.6.0
 cd jemalloc-3.6.0
 ./configure --prefix=/home/bradley/bmalloc/jemalloc
 make
 make install

-----

Some basic results (4 threads a_count=1000000)

                  rss   time
glibc          388752    11.16 ( 9.1 user)
bmalloc        168372    11.92 (15.74 user))
hoard          313284     8.12 ( .79 user)



[bradley@30-87-232 benchmarks]$ time ./server
currentrss=1760
....................................................................................................................................................................................................................................................Total_size_for_this_thread=31167784
Total_size_for_this_thread=27727126
Total_size_for_this_thread=27341095
Total_size_for_this_thread=30455573
a=978167 d=0, a=992335 d=0, a=992071 d=0, a=1000002 d=0, 
thread sum =27727126
thread sum =27341095
thread sum =31167784
thread sum =30455573
before deleting: currentrss=388752KiB
currentrss=388752KiB
maxrss=388752KiB

real	0m11.164s
user	0m9.103s
sys	0m0.753s
[bradley@30-87-232 benchmarks]$ time ./server-bmalloc 
currentrss=1760
.....................................................................................................................................................................................................................................................Total_size_for_this_thread=28812487
Total_size_for_this_thread=27312814
Total_size_for_this_thread=34281324
Total_size_for_this_thread=26775209
a=986246 d=0, a=992280 d=0, a=989159 d=0, a=1000002 d=0, 
thread sum =34281324
thread sum =26775209
thread sum =27312814
thread sum =28812487
before deleting: currentrss=168372KiB
currentrss=168372KiB
maxrss=168372KiB

real	0m11.920s
user	0m15.747s
sys	0m0.362s

[bradley@30-87-232 benchmarks]$ LD_PRELOAD=/home/bradley/projectlocker/svn/bradleycvs/bmalloc/benchmarks/Hoard/Hoard/src/libhoard.so time ./server
currentrss=1616
...................................................................................................................................................................................................................................................Total_size_for_this_thread=28307684
Total_size_for_this_thread=30499216
Total_size_for_this_thread=27597824
Total_size_for_this_thread=30854142
a=1000002 d=0, a=984035 d=0, a=977496 d=0, a=980520 d=0, 
thread sum =28307684
thread sum =30499216
thread sum =27597824
thread sum =30854142
before deleting: currentrss=313284KiB
currentrss=313284KiB
maxrss=313284KiB
8.12user 0.79system 0:10.86elapsed 82%CPU (0avgtext+0avgdata 313588maxresident)k
0inputs+0outputs (0major+77778minor)pagefaults 0swaps

supermalloc's People

Contributors

kuszmaul avatar jserv avatar

Watchers

James Cloos avatar Chiwen Lin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.