
On 06/24/11 20:29, Brian Smith wrote:
If you're program uses a relatively large number of static arrays all in scope at the same time or if a few relatively large static arrays are in scope the stack checker crashes the program when its run, the heap allocated arrays can be present in greater numbers or used when relatively large arrays are required.
If stack space is limited, then why not just allocate the static array on the heap with something like: typedef int elem_t ; typedef bounds3<2,3,4> bounds_t ; typedef array < elem_t , bounds_t , true , null::allocator >::type array_static_t ; array_static_t* p_static=new array_static_t; ? You would then have only 1 call to any allocator instead of 3 and save space on the heap besides. -regards, Larry