Re: Allocationg memory: contigously ?
> if I allocate memory in a simple program like
>
> int* pint1=new[1000];
> int* pint2=new[1000];
> int* pint3=new[1000];
>
> then memory is allocated on the heap. My question is if this three
> "memory fragmetns" are allocated contigously. And if not, what could I
> do to allocate them contigously.
int *bigfatpint = new int[3000];
int *pint1 = bigfatpint;
int *pint2 = bigfatpint + 1000;
int *pint3 = bigfatpint + 2000;
cheers,
Marcin
|