--%>

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 Little-endian Little-endian : It

    Little-endian: It is a common difference among machines is the order in which they store up the individual bytes of multi-byte numerical data. The little-endian machine stores the lower-order bytes prior to the higher-order bytes.

  • Q : Define the term Stack trace Define the

    Define the term Stack trace: It is a display of the runtime stack.

  • Q : Explain Constructor Constructor : A

    Constructor: A constructor is automatically called whenever an instance of its class is formed. A constructor always has similar name as its class, and encompass no return type. For example: public

  • Q : C programming assignment help S trings,

    Strings, Pointers, Arrays, Structures, and File I/O in C In this lab you will develop a few programs that will give you some practice with pointers, arrays, str

  • Q : Abstract list domain The abstract list

    The abstract list domain is as shown: {empty, some, [d1], [d2],[ d1, d2], [d2, d1], all}. A) empty represents empty lists.

    Q : Steps comprised in designing programming

    Write down some of the steps comprised in designing programming?

  • Q : What is a Method body What is a Method

    What is a Method body: It is a body of a method: everything within the outermost block of the method.

  • Q : What are collections and generics What

    What are collections and generics?

  • Q : Differences between logical and

    What are the differences between logical and physical address spaces?

  • Q : Distinct features of Object oriented

    Q. What are the distinct features of Object oriented programming language?  

    Discover Q & A

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

    18,76,764

    1953841
    Asked

    3,689

    Active Tutors

    1412451

    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.