Back to results
US 8,578,347 B1Granted
Determining stack usage of generated code from a model
AssigneeThe MathWorks, Inc.
InventorsJames Carrick, Peter Szpak
Life of this patent
Estimating the term…
Abstract
In one embodiment, a method of determining stack usage of at least a portion of a model for deployment on a target system is provided. The method may include obtaining information describing a first target system, and using the information to estimate a stack usage related to executing a representation of a component of the model on the first target system.
Claims32
A method implemented in an electronic device, the method comprising:
- obtaining information describing a first target system;
- using the information to estimate s maximum stack usage, the maximum stack usage:
- representing a usage of a stack of the first target system at a given time, related to executing a model on the first target system, determined without executing the model,
- and
- estimated by;
- representing function calls of the model as a function call tree, the function call tree having a plurality of invocation paths representing call chains in the model, and
- identifying a most expensive one of the plurality of invocation paths in the function call tree, wherein the most expensive one of the plurality of invocation paths is associated with a most-expensive-path stack usage for others of the plurality of paths;
- and
- setting the maximum stack usage to the most-expensive stack usage.
6 more elements
A system comprising:
- a memory for storing a plurality of components of a model, the model operating in a modeling or programming environment, the modeling or programming environment obtaining information describing a first target system;
- and
- a processor configured to:
- provide a stack usage calculator to estimate a maximum stack usage for executing a representation of the plurality of components on the first target system, the maximum stack usage:
- representing a usage of a stack of the first target system at a given time,
- determined without executing the representation of the plurality of components, and
- estimated by:
- representing function calls of the model as a function call tree, the function call tree having a plurality of invocation paths representing function call chains in the model, and
- identifying a most expensive one of the plurality of invocation paths in the function call tree, wherein the most expensive one of the plurality of invocation paths is associated with a most-expensive-path stack usage, the most expensive stack usage exceeding a stack usage for others of the plurality of paths;
- and
- set the maximums stack usage to most-expensive-path usage.
8 more elements
A non-transitory medium storing executable instructions executable by a computing device:
- obtain information describing a first target system;
- use the information to estimate a maximum stack usage, the maximum stack usage:
- representing a usage of a stack of the first target system at a given time,
- related to executing a model on the first target system,
- determined without executing the model, and
- estimated by:
- representing function calls of the model as a function call tree, the function call tree having a plurality of invocation paths representing function call chains in the model, and
- identifying a most expensive one of the plurality of invocation paths in the function call tree, wherein the most expensive one of the plurality of invocation paths is associated with a most-expensive-path stack usage that exceeds a stack usage for others of the plurality of paths;
- setting the maximum stack usage to the most-expensive-path stack usage;
- and
- storing the maximum stack usage in a storage.
8 more elements
Dependencies are inferred from the claim text.