Patent ID: 8195885

Claim:
An electronic unit equipped with a microprocessor and a random access memory, in which the microprocessor performs, based on a multitask operating system able to run a plurality of tasks, a task in the plurality of tasks, and save context data of the task in a stack provided in the random access memory, the context data being composed of a plurality of bits, and, if the context data is returned to the microprocessor or deleted, a value of each bit of the context data saved in the stack remains in the stack as historical data, the electronic unit comprising: a measuring module configured to: reference, block by block, the stack to detect a block with all bits being reset as a target block without the historical data, and measure a maximum amount of data stored in the stack based on a number of the target blocks in the stack, the target blocks continuing from a top of the stack toward a bottom thereof in a direction opposing to data stack direction in the stack; a storing module configured to store therein the maximum amount of data measured by the measuring unit; and an activation control module configured to activate the measuring unit during a task using the stack in neither a running state nor a ready state.