This fix is quick-and-dirty since it only reduces the amount of stackspace allocated by changing the data type of the array to uint8_t instead of the 32 bit integers. The reduced number of bits is OK since only (at most) 2 of the available bits are used in each element.
At least array bit utilization is improved from 6.66% to 25% :)
Large structures such as these should probably be malloc()ed.
/* But it does not work if compiling on WIndows: therefore we just allocate a */
/* large array */
- int BitStream[MAX_GRAPH_TRACE_LEN];
+ uint8_t BitStream[MAX_GRAPH_TRACE_LEN];
/* Detect high and lows */
for (i = 0; i < GraphTraceLen; i++)
int parity[4];
char id[11];
int retested = 0;
- int BitStream[MAX_GRAPH_TRACE_LEN];
+ uint8_t BitStream[MAX_GRAPH_TRACE_LEN];
high = low = 0;
/* Detect high and lows and clock */