C allocator

Open-source C projects categorized as allocator

Top 6 C allocator Projects

  1. buddy_alloc

    A single header buddy memory allocator for C & C++

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. libpool

    Tiny (ANSI) C library for pool allocation

    Project mention: Writing a simple pool allocator in C | news.ycombinator.com | 2025-01-06

    > I would do exactly the dual: the chunk's size should be defined at pool creation, so that you can create multiple pools, each dedicated to one specific kind of object.

    This is supported in my 'libpool' project. I thought I mentioned it in the article, but now I am not so sure.

    https://github.com/8dcc/libpool/blob/main/src/libpool.h#L51

    > Similarly, I don't like exposing pool_expand(): too much burden on the user. Expansion should be automatically triggered by pool_alloc() whenever the current pool is exhausted.

    I feel like this shouldn't be too hard to do, but I actually did write a function for this in another project I am working on.

    https://github.com/8dcc/sl/blob/9ddd84d75ffc3b0ba1373bc13bc6...

    > This would also allow a much simpler pool_new() that just initializes its pointers to NULL, leaving it to the first invocation of pool_alloc() to actually do the first allocation.

    I didn't think of this, but I rather keep the two functions separate, specially for readability in the article.

  4. Memory-Allocators

    A set of custom memory allocators (by pavlosdais)

  5. allocator

    Customisable, thread-safe C11 memory allocator based off the K&R "storage allocator" (by a-p-jo)

  6. c-allocators

    A collection of public domain single-file custom allocators for C/C++

    Project mention: Show HN: I made a library for dynamic stack strings in C | news.ycombinator.com | 2024-06-25

    I've been playing with this arena bump allocator.

    https://github.com/gilzoide/c-allocators

    I've been using it with an event driven code where after an event is fired off and returns the handler just hard resets the arena.

    You could probably use something like that as well.

    Either way I support not mixing manual memory management with business logic.

  7. yalloc

    Yet another memory allocator -affordable safety

    Project mention: Show HN: Yet another memory allocator – affordable safety | news.ycombinator.com | 2025-01-27
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C allocator discussion

Log in or Post with

C allocator related posts

  • Show HN: I made a library for dynamic stack strings in C

    2 projects | news.ycombinator.com | 25 Jun 2024
  • Memory Allocators

    2 projects | /r/C_Programming | 26 Aug 2023
  • buddy memory allocator - project update (2 years)

    1 project | /r/C_Programming | 12 Jun 2023
  • Rpmalloc – General Purpose Memory Allocator

    1 project | news.ycombinator.com | 18 Apr 2023
  • Open-source MISRA-compliant projects

    2 projects | /r/C_Programming | 28 Dec 2022
  • Rust Mimalloc v0.1.30 has just been released!

    3 projects | /r/rust | 13 Oct 2022
  • Reference Count, Don't Garbage Collect

    9 projects | news.ycombinator.com | 29 Jul 2022
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 16 May 2025
    InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →

Index

What are some of the best open-source allocator projects in C? This list will help you:

# Project Stars
1 buddy_alloc 184
2 libpool 30
3 Memory-Allocators 25
4 allocator 13
5 c-allocators 5
6 yalloc 0

Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com