Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hardikp/cpp-mempool

C++ header-only mempool library
https://github.com/hardikp/cpp-mempool

cpp memory-allocation memory-management memory-pool

Last synced: 28 days ago
JSON representation

C++ header-only mempool library

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/hardikp/cpp-mempool.svg?branch=master)](https://travis-ci.org/hardikp/cpp-mempool)

# cpp-mempool
C++ header-only mempool library

## Examples
```C++
#include

int main(int argc, char** argv) {
unsigned capacity = 1024;
MemPool pool(capacity);

for (auto i = 0u; i < capacity * 2; i++) {
int *location = pool.allocate();
}
}
```

## Notes
* `MemPool` is not thread-safe. If you're trying to use a single memory pool from multiple threads, it can create race conditions.