Containers for already allocated memory

I am surprised that Boost does not seem to contain a vector-like container which uses a pre-allocated block of memory. In my own code I find this very useful, in particular with memory allocated by 'alloca'. Have I missed such a package? Is there any interest in such a package being submitted to boost if I tidied up my own code? Chris

Look at Array and Intrusive libraries.
I am surprised that Boost does not seem to contain a vector-like> container which uses a pre-allocated block of memory. In my own code I> find this very useful, in particular with memory allocated by> 'alloca'.> > Have I missed such a package? Is there any interest in such a package> being submitted to boost if I tidied up my own code?> > Chris> _______________________________________________> Boost-users mailing list> Boost-users@lists.boost.org> http://lists.boost.org/mailman/listinfo.cgi/boost-users
News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx

2008/5/21 Igor R.
Look at Array and Intrusive libraries.
Thanks, but neither of these really satisfy my requirements: Intrusive is for things like lists, rather than a vector-type structure, and as it is intrusive, I can't easily put pointers and ints in it. Arrays do go on the stack, but have to have a compile-type size and you can't "push_back" into them. Chris
I am surprised that Boost does not seem to contain a vector-like container which uses a pre-allocated block of memory. In my own code I find this very useful, in particular with memory allocated by 'alloca'.
Have I missed such a package? Is there any interest in such a package being submitted to boost if I tidied up my own code?
Chris _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
________________________________ Get news, entertainment and everything you care about at Live.com. Check it out! _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

"Chris Jefferson" writes:
2008/5/21 Igor R.
: Look at Array and Intrusive libraries.
Thanks, but neither of these really satisfy my requirements:
Intrusive is for things like lists, rather than a vector-type structure, and as it is intrusive, I can't easily put pointers and ints in it.
Arrays do go on the stack, but have to have a compile-type size and you can't "push_back" into them.
There's the interprocess library in 1.35. Take a look at its "stl-compatible" containers, and the managed_external_buffer. -bryan
participants (3)
-
Bryan Green
-
Chris Jefferson
-
Igor R.