Home |
RTKernel-32 Programming Manual Multitasking, Real-Time, and RTKernel-32 Alternate APIs for RTKernel-32 Stack Errors |
Stack ErrorsIf the stack of a task overflows and the run-time system does not catch the error (because the routine concerned has been compiled with stack checking off), an error usually occurs much later in some other task whose data has been corrupted. Therefore, this type of error is very difficult to locate. Consequently, it is recommended to dimension the stacks generously. For most - but not all - tasks, 16k bytes are sufficient. Use functions RTKIRQInfo and RTKTaskInfo with options LF_FREE_STACK and LF_MIN_STACK extensively to monitor actual stack usage at run time.
|