Giter Club home page Giter Club logo

alloc-test's Introduction

NOTE: 32-BIT PLATFORMS HAVE NOT YET BEEN TESTED!

To test tcmalloc / jemalloc / hoard / ptmalloc:

1. Make sure new_delete_allocator is selected at selector.h

2. See useful build notes at section "Testing" at http://ithare.com/testing-memory-allocators-ptmalloc2-tcmalloc-hoard-jemalloc-while-trying-to-simulate-real-world-loads/

3. Edit build_gcc.sh to enable one of the above allocators (add/edit to have one of -ljemalloc, -ltcmalloc, -lhoard, or -L path/to/libmalloc.a) (
   Note: -lhoard: see https://github.com/emeryberger/Hoard
         -L path/to/libmalloc.a assumes that libmalloc.a is already built for a target platform


To test any other allocator:

1. Create "src/my_allocator.h" file with a class representing an allocator to be tested.
   As a sample "src/new_delete_allocator.h" or "src/void_allocator.h" could be taken.
   class MyAllocator must have all member functions found in the above-mentioned samples
   as this class is used as a template parameter in the testing routine
   
2. Edit "src/selector.h" to switch to using a new allocator

3. Rebuild and run

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.