--%>

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 the term Arpanet Define the term

    Define the term Arpanet: It is a network which was a forerunner of the global Internet.

  • Q : Explain Automated Testing-Software

    Automated Testing: Software testing is the most generally used technique for verifying and validating software. While testing may not provide the same rigor as model checking, it is far more scalable and usually does not require a significant tool inf

  • Q : Define the term Instance Define the

    Define the term Instance: It is a synonym for object. The objects of a class are instantiated whenever a class constructor is invoked through the new operator.

  • Q : Define Certificates Define Certificates

    Define Certificates: They are digital documents attesting to the binding of a public key to an individual or another entity. They permit verification of the claim which a given public key does in fact fit in to a given individual. The certificates hel

  • Q : Define Bootstrap classes Bootstrap

    Bootstrap classes: The classes which make up the Java Platform Core Application Programming Interface (API), like those found in the java.lang, java.io and java.io packages.

  • Q : Write a program to display its negative

    Write a program in object code that reads a single digit decimal number and displays its negative in binary.  To do this, you must first read the number as a character and then convert it to its numeric value, as discussed in class.  Then, you're going to change this to a negative numbe

  • Q : Explain Command-line argument

    Command-line argument: The arguments passed to a program whenever it is run. The Java program receives such in the single formal argument to its major method: public static void main(String[] args)

  • Q : Write a program that initializes an

    Write a program that initializes an integer array a[20] with values {0, 1, 2, 3, ...18, 19 - once each} then scrambles them up and prints the values in random order. For example: 19 2 3 8 11 1 4 17 7 15 9 0 16 12 18 13 5 6 10 14    

  • Q : Situations where AJAX must not be used

    Explain the situations in which the AJAX must not be used.

  • Q : Explain the signing mandatory within

    Explain the signing mandatory within S60 3rd Edition.