Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hardikp/cpp-mempool
- Owner: hardikp
- License: mit
- Created: 2017-12-18T18:15:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-20T02:43:24.000Z (almost 7 years ago)
- Last Synced: 2024-08-04T02:09:23.756Z (4 months ago)
- Topics: cpp, memory-allocation, memory-management, memory-pool
- Language: C++
- Size: 87.9 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeCppGameDev - cpp-mempool - only mempool library (C++)
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++
#includeint 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.