【文件属性】:
文件名称:Memory-Pool:仅C ++标头的内存池库
文件大小:16KB
文件格式:ZIP
更新时间:2021-04-07 02:40:09
C++
仅C ++标头的内存池库
小的。 1个带有1个类的头文件供使用: lida::MemoryPool 。
兼容STL。 理想情况下,它可与std::list , std::set和std::map 。
快速地。 您甚至可以通过使用reverse()预分配内存来使其更快。
安装
将存储库添加为项目中的子目录,并“链接”该库以正确获取包括:
add_subdirectory (Memory-Pool)
target_link_libraries (YOUR_TARGET_NAME PRIVATE lida::Memory-Pool)
用法
实际上, lida::MemoryPool只是STL兼容的分配器。 例子:
// modified https://en.cppreference.com/w/cpp/container/list
# include < algorithm>
# i
【文件预览】:
Memory-Pool-master
----include()
--------lida()
----LICENSE(34KB)
----README.org(2KB)
----.gitignore(43B)
----CMakeLists.txt(239B)