--%>

Use of setjmp and longjmp

Use of setjmp() and longjmp(): In C/C++, setjmp() saves the contents of the registers at a particular state in the program and longjmp() will restore that state later. In this way, longjmp() “returns” to the state of the program when setjmp() was called.

In general these functions are problematic for C++ because they do not support C++ object semantics. In particular, they do not ensure the proper destructor calls and so objects may not be cleaned up properly, leaving the system in a bad state.

Using these functions may also degrade performance by preventing optimization on local variables. For C++ exception handling, try/catch constructs are recommended instead.

214_serjmp.jpg

For model checking in particular, non-hierarchical long jumps are difficult to model with modeling languages like Java. These functions need to do register restoration which requires modeling of registers and their related operations, adding considerable overhead to model-checking effort.

   Related Questions in Programming Languages

  • Q : Define Abstract class Abstract class :

    Abstract class: It is a class with the abstract reserved word in its header. The Abstract classes are differentiated by the fact that you might not directly construct objects from them employing the new operator. The abstract class might have zero (0)

  • Q : Define Java Archive file Java Archive

    Java Archive file: It is a Java Archive (JAR) file which makes it possible to store multiple bytecode files within a single file.

  • Q : Define Continuous simulation Continuous

    Continuous simulation: In a continuous simulation, the time ticks past at a regular rate which is applicable to the specific simulation scenario. At each and every tick, all the objects in the simulation are informed of the passage of time and updated

  • Q : Describe object-oriented programming

    Briefly describe object-oriented programming (OOP)?

  • Q : Types of validation controls of ASP.NET

    List the types of validation controls that are available in the ASP.NET AJAX 4.0?

  • Q : Define Checked exception Checked

    Checked exception: An exception which should be caught locally in the try statement, or propagated through a throws clause stated in the method header.

  • Q : Components of ASP.NET AJAX architecture

    Name the components of ASP.NET AJAX architecture?

  • Q : Define Short-circuit operator

    Short-circuit operator: It is an operator in which only as a lot of operands are computed as are required to determine the final outcome of the operation. The logical-and (&&) and logical-or (||) operators are most general illustration, though

  • Q : ERD What is the meaning ofDerive the

    What is the meaning ofDerive the department and staff relations from the following ERD.

  • Q : Define the term RGB Color Model Define

    Define the term RGB Color Model: It is a color model based on representing a color as three components: green, red, and blue.