Code Monkey home page Code Monkey logo

userland-slab-allocator's Introduction

Slab Allocator

This is a carefully optimised slab allocator for userspace. It relies on anonymous mmap(2) page allocations, or occassionally on posix_memalign(3) for larger objects.

Bit-vectors are used to indicate whether the corresponding slots are free and that makes the allocations and deallocations very quick most of the time.

When allocating an object, a 64-bit unsigned integer is scanned for its first set bit (this usually translates to a single BSF instruction on x86).

When deallocating an object, the location of the corresponding slab is quickly found by masking the passed object pointer with the alignment mask of the corresponding slab chain.

alt tag

License

You may freely modify and redistribute the code as long as you preserve the link in the source code to this repository.

userland-slab-allocator's People

Contributors

bbu avatar

Stargazers

 avatar YQ avatar  avatar  avatar Masanori Ogino avatar Eason Wang avatar Alexej avatar Zhiting Zhu avatar hayden avatar  avatar cody avatar Simon avatar Yves Vollmeier avatar  avatar  avatar  avatar  avatar Pingkai Liu avatar Mengbing Wang avatar Raphaël Thériault avatar bigrpg avatar  avatar  avatar LiuWei avatar  avatar mooaccel avatar Alexandre Larouche avatar augustinus avatar yuanzhu avatar thom_tl avatar John Binkley avatar olly avatar 中仔 avatar Serapheim Dimitropoulos avatar  avatar Aaron Siegel avatar Yota Toyama avatar Xuguo Wang avatar Oleg Lyovin avatar  avatar Domen Puncer Kugler avatar Luke McCarthy avatar zhoujie avatar  avatar Khalid Lafi avatar Brian Cannard avatar  avatar Lourens Naudé avatar  avatar Fei Zhang avatar Omer Katz avatar  avatar Bruno Dias avatar Ahmed Samy avatar chunk avatar Jioh L. Jung avatar Lukas avatar adnan avatar Zhenbang Liu avatar likun123687 avatar Ryan Egesdahl avatar ytakano avatar  avatar AlexShi avatar  avatar Alessandro Pellegrini avatar Ralitsa Buyuklieva avatar Quinlan Pfiffer avatar Paul G avatar Scott Ivey avatar liuyanghejerry avatar forhappy avatar Oleksandr (Sasha) Sochka avatar Dan Lentz avatar  avatar Alexander Sannikov avatar louxiu avatar

Watchers

 avatar James Cloos avatar louxiu avatar  avatar  avatar  avatar

userland-slab-allocator's Issues

Specify a license

I don't see a license mentioned anywhere. Unfortunately, I can't even consider using this without one.

If you haven't decided on one yet, I would prefer the MIT License (the Wikipedia article is also informative) which is a basically as permissive a license as there is, so if you just want to let anyone use your software it's a great way to go.

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.