--%>

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 : Business Process Management Describe

    Describe what is Business Process Management (or BPM) in brief.

  • Q : What is Java What is Java: It is a

    What is Java: It is a portable high level programming language introduced by Sun Microsystems.

  • Q : Explain Inheritance hierarchy

    Inheritance hierarchy: The relationship among super-classes and sub-classes is termed as an inheritance hierarchy. The single inheritance of classes means that each and every class has simply a single `parent' class and that Object class is the eventu

  • Q : Explain Hot spot Hot spot : This is an

    Hot spot: This is an area in an image map with a specific significance. A program usually monitors movements of the mouse, and reacts according to the actions related with the hot spots over which it passes. This may comprise displaying various status

  • Q : Directory and filename Explain

    Explain directory and filename?

  • Q : Swapping system What action of the

    What action of the swapping system does in case it identifies the illegal page for the swapping?

  • Q : What is Dotted decimal notation Dotted

    Dotted decimal notation: The notation employed to symbolize the 4-byte values of an IP address. Each and every byte is symbolized as a value between 0 to 255, for instance 129.12.0.1. The most noteworthy byte is written at first.

  • Q : Which is the tool having demand within

    Which is the excellent tool one should learn, which is the tool having demand within the market?

  • Q : Difference between the choice and list

    Illustrate the difference between the choice and list?

  • Q : File handling modes and corresponding

    Discover Q & A

    Leading Solution Library
    Avail More Than 1455968 Solved problems, classrooms assignments, textbook's solutions, for quick Downloads
    No hassle, Instant Access
    Start Discovering

    18,76,764

    1926898
    Asked

    3,689

    Active Tutors

    1455968

    Questions
    Answered

    Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!

    Submit Assignment

    ©TutorsGlobe All rights reserved 2022-2023.