阅读背景:

我应该使用什么C ++ STL类来减少由大量小分配引起的碎片?

来源:互联网 

My C++ class builds a tree structure over time. Each node in the tree is currently allocated on construction (using new). The node class uses only a few bytes of memory. As the tree grows there may be 100,000s of nodes; the maximum number of nodes is not known on construction of the tree, other than the theoretical maximum of 2^33. I reference nodes in the tree structure by their pointer. All nodes are deallocated on destruction of the tree, and only then.My C++ class builds a tree structure over time.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: