Paul Pluzhnikov wrote:
> [EMAIL PROTECTED] writes:
>
> > How do I allocate memory for a large (10,000+) fixed size array ?
>
> Any way you wish:
>
>   malloc(size);
>   mmap(0, size, ... MAP_ANON, ...);
>   std::vector<...> v(size);
>
> > In this case complexity is critical so I do not
> > want to use std:vector or some other dynamic structure.
>
> Come again?

I mean fixed (like an old school array) instead of dynamic like a
linked list, heap, skip list, etc, etc.. or whatever on earth
std::vector is equivalent to.  See my post on comp.lang.c++, actually
don't bother.

Thanks your answer was succinct, although neither..

const size_t mysize = 10000;
typedef std::vector<f> fvec(mysize);

or
typedef std::vector<f> fvec;

class g
{
..
fvec f(mysize);

would compile for me.

Apologies for the off topic c++.

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to