function memory allocation in c code example
Example 1: c malloc array
#define ARR_LENGTH 2097152
int *arr = malloc (ARR_LENGTH * sizeof *arr);
Example 2: allocate memory c
ptr = (castType*)calloc(n, size);
#define ARR_LENGTH 2097152
int *arr = malloc (ARR_LENGTH * sizeof *arr);
ptr = (castType*)calloc(n, size);