Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualMisery

Posted 19 January 2012 - 01:24 PM

Hi,

I would like to allocate memory from pool for a matrix. How to do this correctly?
Do I have to allocate the memory for a vector of pointers first? Or just the matrix entries?
I would like to allocate the whole matrix in one memory block.

 float **matrix=NULL;
 int Cols=someValue, Rows=someValue;

How to allocate this with memory pool like this:

 void *Allocate(int Size);

Thanks in advance,
regards

#1Misery

Posted 19 January 2012 - 01:19 PM

Hi,

I would like to allocate memory from pool for a matrix. How to do this correctly?
Do I have to allocate the memory for a vector of pointers first? Or just the matrix entries?
I would like to allocate the whole matrix in one memory block.


Thanks in advance,
regards

PARTNERS