GithubHelp home page GithubHelp logo

tempbottle / userland-slab-allocator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bbu/userland-slab-allocator

0.0 1.0 0.0 74 KB

A carefully optimised, POSIX-compatible slab allocator for userspace.

Shell 0.63% C 99.37%

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

Watchers

 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.