简体   繁体   中英

STL-compliant memory allocator library

I need to use a map , with keys as uint32_t and values as Meshes . 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.

(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 )

Thanks

Deque

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

Nothing else much to say. Go read about it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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