Giter Site home page Giter Site logo

memoryallocator's Introduction

Small footprint Memory Allocator for Embedded Systems and tests


DESCRIPTION: Allocates a pool of memory blocks as requested from the user code and maintains this pool. Uses the heap only once during initialization. All allocations and releases are constant time O(1). Crafted for embedded system usage since the dynamic memory allocation is used only during boot time for a statically defined size and this memory pool is managed


USAGE: #include <MemAllocator.h> in your source file.

  1. Call init first : init(int count,int size)
  2. Allocate memory blocks using Allocate(), returns a pointer to one of the blocks
  3. Release memory blocks using Release(void *pBlock), pass a pointer to the block to be released

TEST: Unit tests are provided in MemTest.c file. To enable tests remove NDEBUG flag from the MakeFile CFLAGS. Configure the tests in Memtest.c using 2 macros: #define TEST_SIZE 10 #define TEST_DTYPE int

memoryallocator's People

Contributors

ozangunaydin avatar

Watchers

James Cloos avatar  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.