简体   繁体   English

符合STL的内存分配器库

[英]STL-compliant memory allocator library

I need to use a map , with keys as uint32_t and values as Meshes . 我需要使用键为uint32_t且值为Meshesmap I want the meshes to be layed out in contigous memory for performance, as they will be accessed very often in succession. 我希望将网格放置在连续的内存中以提高性能,因为网格将经常被连续访问。

I am wondering what memory-allocator libraries are available that provides the following aswell; 我想知道还有哪些内存分配器库可以提供以下功能;

  • Allocates to contigous memory space 分配给连续的内存空间
  • Preferably handles fragmentation of said memory space 最好处理所述存储空间的碎片
  • As fast as possible and as little additional features as possible besides what I mentioned 除了我提到的内容之外,尽快并尽可能少地添加其他功能

I've looked at boost, but it dosn't seem to provide what I'm looking for. 我已经看过Boost了,但是它似乎并没有提供我想要的东西。

(Reason I'm not using vector is that the container will grow and shrink alot, and I prefer to have a uint32_t as the identifier for a mesh ) (原因是我不使用vector原因是容器会大量增长和收缩,我更喜欢使用uint32_t作为mesh的标识符)

Thanks 谢谢

Deque 双端队列

http://www.cplusplus.com/reference/deque/deque/ http://www.cplusplus.com/reference/deque/deque/

Nothing else much to say. 没什么可说的。 Go read about it. 去读一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM