Coder Social home page Coder Social logo

exmallib's Introduction

exmallib: Exception's malloc library

Introduction

The exmallib library provides an interface to UnhandledException's personal implementations of malloc (exmalloc), free (exfree), realloc (exrealloc), and calloc (excalloc), along with a custom (albeit simple) heap allocator. exmalloc, exrealloc, and excalloc provide chunk-aligned memory blocks closest in size to the user's request, while reusing as much space as possible and dealing with memory fragmentation in the background.

Purpose

This library is the result of my quest to learn more about the internals of C and memory management on Linux systems. I suppose it could also be used as a starting point for the construction of memory allocators on other systems as well.

Usage

Simply add exmallib.h, exmallib.c, and helpers.c to your project! You could also separately compile these and link the library after the fact: see the Build section to see how.

Build

The code

cmake is required to build the code. Otherwise you can build it manually using gcc or any other C99+ compiler. With cmake, run the following commands to set up the build system:

git clone https://github.com/vedangnaik/exmallib.git
cd exmallib
mkdir build
cd build
cmake .

Run cmake --build .. directly after to build the code. The output file is placed in /build.

The docs

doxygen is required to build the documentation. Run the following commands from /exmallib to build it. The config file Doxyfile can be modified as per your requirements.

mkdir docs
doxygen Doxyfile

exmallib's People

Contributors

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