sjlongland / qqmrichter-opalloc

Object pool implementation (mirror of https://gitee.com/ACleverDisguise/opalloc)

Home Page:https://personaljournal.ca/qqmrichter/dynamically-static-allocation-in-embedded-systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object Pool Allocator

An "object pool" framework for minimally-fragmenting interlaced dynamic allocation and deallocation of dynamic memory objects in C.

In embedded and small-memory systems, excessive use of dynamically allocated objects can cause heap fragmentation such that, despite there being sufficient free space in the heap for an object, calls to malloc() and related functions fail because no single block is large enough to fulfill the desired request.

This library provides an implementation of a smarter memory pool manager that combats this problem by minimizing the number of interlaced allocations, deallocations and reallocations at a slight expense in memory and CPU overhead. It supplies a low level interface for building custom allocators in cases where fine control is needed, a high level interface for the most common and simple use cases, and a macro interface for the easiest use case.

C.f. https://personaljournal.ca/qqmrichter/dynamically-static-allocation-in-embedded-systems for details on implementation and rationale.

About

Object pool implementation (mirror of https://gitee.com/ACleverDisguise/opalloc)

https://personaljournal.ca/qqmrichter/dynamically-static-allocation-in-embedded-systems

License:Do What The F*ck You Want To Public License


Languages

Language:HTML 63.3%Language:C 12.3%Language:CSS 12.1%Language:JavaScript 11.9%Language:Makefile 0.3%