Since scoped_ptr
guarantees that all objects in a given thread are allocated in a stack-like fashion, what is the least painful way of specifying a "custom heap" for objects under scoped_ptr
?
(e.g. for vector
s, deque
s, string
s, etc.)
(This would allow us to avoid the traditional heap overhead almost entirely, getting a pool that is almost as fast as the stack, but as large as the heap.)