xmempool 1.1.2
A memory pool implemented by C.
|
A memory pool implemented by C.
X Memo Pool is a lightweight and efficient memory management solution designed to optimize memory allocation and deallocation in C programs. It provides a pool-based approach to memory management, which can significantly improve performance in scenarios where frequent allocations of fixed-size blocks are required.
Note: Sharing a single pool across multiple threads is not recommended for thread safety.
To start using X Memo Pool, first create a pool handler for your data structure:
Example:
To allocate a block from the pool:
Example:
To return a block to the pool:
Example:
To destroy the entire pool and free all associated resources:
Example:
For more detailed information about the API, please refer to the xmempool.h header file.
To run performance tests:
The performance report will be generated in the ./perf/report
directory.
Contributions to X Memo Pool are welcome! Feel free to submit pull requests or open issues for bugs, feature requests, or improvements.
X Memo Pool is open-source software. Please refer to the [LICENSE](LICENSE) file for detailed licensing information.