3 ms·
PMR is slightly different, the memory wouldn't exist in the vector itself but up the stack. InlinedVector looks like SBO used in string, pretty neat still. N
by beached_whale 5y ago
PMR is slightly different, the memory wouldn't exist in the vector itself but up the stack. InlinedVector looks like SBO used in string, pretty neat still.
N is actually pretty simple here and doesn't need to be perfect. I have used 1-4kb / sizeof( T ) and it seems to work well. 4kb is an interesting number in that it is often the OS page size and it is what libc++ dequeue uses. But the memory that isn't used can be returned to the system and it costs about the same as sizeof( T )