The following will be discussed in this chapter: Constructing SLR-parsing tables, viable prefixes, powerful LR parsers, canonical LR items, constructing LR sets of items, canonical LR parsing tables, constructing LALR parsing tables. | LESSON 22 Overview of Previous Lesson(s) Over View 3 Debugger A computer program that is used to test and debug other programs. Local Debugging Debugging process and the source code are deployed on the same machine. Remote Debugging Source program is running on a separate machine and the debugging takes place on an isolated box Over View 4 Dry Run A dry run is sometimes defines as a mental run of a computer program. Where the computer programmer examines the source code one step at a time and determines what it will do when run. TODAY’S LESSON Contents Debugging Dynamic Memory Checking the Free Store Controlling Free Store Free Store Debugging Output Memory Leaks 6 Debugging Dynamic Memory Allocating memory dynamically is a potent source of bugs, and perhaps the most common bugs in this context are memory leaks. A memory leak arises when we use the new operator to allocate memory. We never use the delete operator to free it again. 7 Debugging Dynamic Memory Memory leaks present no obvious symptoms much of the time, but memory leaks are detrimental to the performance of your machine because memory is being occupied to no good purpose. Sometimes, it can result in a catastrophic failure of the program when all available memory has been allocated. 8 Debugging Dynamic Memory For checking program’s use of the free store, Visual C++ provides a range of diagnostic routines. These routines use a special debug version of the free store. These are declared in the header . All calls to these routines are automatically removed from the release version of your program. 9 Checking the Free Store A concise overview of techniques involved In checking free store operations. How memory leaks can be detected. The functions declared in check the free store using a record of its status stored in a structure of type CrtMemState . Lets check this struct 10 Checking the Free Store typedef struct _CrtMemState { struct _CrtMemBlockHeader* pBlockHeader; // Ptr to . | LESSON 22 Overview of Previous Lesson(s) Over View 3 Debugger A computer program that is used to test and debug other programs. Local Debugging Debugging process and the source code are deployed on the same machine. Remote Debugging Source program is running on a separate machine and the debugging takes place on an isolated box Over View 4 Dry Run A dry run is sometimes defines as a mental run of a computer program. Where the computer programmer examines the source code one step at a time and determines what it will do when run. TODAY’S LESSON Contents Debugging Dynamic Memory Checking the Free Store Controlling Free Store Free Store Debugging Output Memory Leaks 6 Debugging Dynamic Memory Allocating memory dynamically is a potent source of bugs, and perhaps the most common bugs in this context are memory leaks. A memory leak arises when we use the new operator to allocate memory. We never use the delete operator to free it again. 7 Debugging Dynamic Memory Memory leaks present .