MathcadAllocate |
char * MathcadAllocate(size)
unsigned int size;
Defined in mcadincl.h. Used to allocate memory for complex scalars and strings inside MyCFunction. Allocates a memory block of a given size (in bytes) of memory.
Parameter |
Description |
size |
Size (in bytes) of memory block to allocate. Should be non-zero. |
Returns a pointer to the storage space. To get a pointer to a type other than char, use a type cast on the return value. Returns NULL if the allocation failed or if size is equal to 0.
Free memory using MathcadFree. To allocate memory for arrays, use MathcadArrayAllocate. See the example.