check that directive
In this section:
Syntax
check thatexpression[, "errormsg"];
Parameters
| A boolean expression. |
| A string that is output if the check fails. |
Description
You can use the check that directive to compare the results of stack usage analysis against the sizes of blocks and regions. If the expression evaluates to zero, an error is emitted.
These extra operators are available:
| The stack depth of the deepest call chain for any call graph root function in the category. |
| The sum of the stack depths of the deepest call chains for each call graph root function in the category. |
| The size of the block. |
| Returns |
Examples
check that maxstack("Program entry")
+ totalstack("interrupt")
+ 1K
<= size(block CSTACK);
check that !(exists(block HEAP)) || size(block HEAP) >= 50, "not enough heap";