
8 Feb
2008
8 Feb
'08
9:01 p.m.
Hervé Brönnimann wrote:
Michael: If you are allocating your container before main, you must know how much memory is needed at compile time, don't you? Can't you reserve that memory statically (e.g. a char buffer[SIZE]) and use an arena allocator for your statically created container? This goes for any container, not just the unordered ones. Just my $.02,
The usage I was thinking of was the container stored in an object that was used as a Meyer's singleton (i.e. function local static) that would not be accessed before main. - Michael Marcin