GithubHelp home page GithubHelp logo

malloc_rs's Introduction

Memory allocation using Rust. The brk syscall 12 is used for memory allocation specifically for x86_64 machine.

Running

Use nightly to enable feature feature(llvm_asm)

rustup override set nightly-2021-07-12

Run unit test:

cargo test -- --test-threads=1

Some tests uses brk to keep track of memory offset that requires test to run in sequence.

Run endless multithreaded producer-consumer queue test:

cargo run $JOB_PER_SECOND $NUM_WORKERS $STRATEGY

where $JOB_PER_SECOND is the number of push to the queue per second, and $NUM_WORKERS is the number of worker which consumes the queue. $STRATEGY can be either BEST_FIT or FIRST_FIT with the latter as default.

Example:

cargo run 30 3 BEST_FIT

TODO

  • Explicit free list optimization
  • How to run unit test in parallel
  • Safely use Queue concurrently without unsafe dereferencing
  • Implement for other architecture

malloc_rs's People

Contributors

rifqifatih 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.