Skip to content

Can a vector use a memory pool with a small_node_pool ? #170

Answered by foonathan
chrisics asked this question in Q&A
Discussion options

You must be logged in to vote

vector allocates arrays of small items, so the size of the item isn't an issue, and memory_pool isn't great about arrays. If your vector is large, you won't need a custom allocator - the default one should handle it fine. If your vector is small, you have many of them, and don't mind wasting memory for a while, you can use memory_stack.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chrisics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #168 on July 09, 2023 08:42.