| MF_matrix
| MD_matrix |
ME_matrix |
| MCF_matrix |
MCD_matrix |
MCE_matrix |
|
| Function | Memory allocation for a matrix |
|
| Syntax C/C++ | #include <MFstd.h>
fMatrix F_matrix( unsigned ht, unsigned len ); |
| Pascal/Delphi | uses MFstd;
function MF_matrix( ht, len:UInt ): fMatrix; |
|
| Description | Based 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 handling | If 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 value | C/C++: Pointer to the array of row pointers
Pascal/Delphi: Pointer to the allocated memory |
|
|