MF_matrix MD_matrix ME_matrix
MCF_matrix MCD_matrix MCE_matrix
MI_matrixMBI_matrixMSI_matrixMLI_matrixMQI_matrix
MU_matrixMUB_matrixMUS_matrixMUL_matrixMUQ_matrix;
FunctionMemory allocation for a matrix
Syntax C/C++#include <MFstd.h>
fMatrix F_matrix( ui ht, ui len );
Pascal/Delphiuses MFstd;
function MF_matrix( ht, len:UIntSize ): fMatrix;
DescriptionBased on memory model and environment, the most appropriate allocation procedure is chosen by these functions. Failure to allocate memory always leads to an error message and a subsequent program abort (similar to the error handling of the "new" operator). To release the memory thus allocated, M_free,  M_nfree, or V_freeAll should be used (M_nfree only in C/C++).
Note: the declaration of a matrix (e.g., as fMatrix) reserves only a name, but no memory!
See chapter 4.1 if you are interested in details of the implementation.
Error handlingIf there is not enough memory available, or if size is zero, an error message "Not enough memory" is displayed and the program aborted.
16-bit models:
If more than 64 kB of memory are requested, an error message "Vector > 64 kB not possible" is displayed and the program aborted (except in the model HUGE). If any of the two matrix dimensions exceeds the 64 kB limit, an error message "Invalid matrix dimension(s)" is displayed and the program aborted, even in the model HUGE.
32-bit:
If more than 4 GB of memory are requested, an error message "Vector > 4 GB not possible" is displayed and the program aborted. If already a single matrix dimensions exceeds this limit, an error message "Invalid matrix dimension(s)" is displayed and the program aborted.
Return valueC/C++: Pointer to the array of row pointers
Pascal/Delphi: Pointer to the allocated memory
See alsoMF_matrix0,   VF_vector,   chapter 2

MatrixLib Table of Contents  OptiVec home