CPW Pt. 10: Detecting Memory Leaks with valgrind

Access to heim

We only allow IPs the belong to our network to login on heim. For accessing heim from at home first login on theon with ssh. From there access heim with ssh heim.

Exercise

Update all test programs so that finalize() or finalizeExit() gets called before the program terminates.

Work Left To Do

In case of a syntax error we terminate the calculator. Calling finalizeExit() will cleanup some of the allocated memory but in general not all. All the expression nodes that were allocated in the parser will not be freed.

We will fix this problem later. In the next session we will first make some modifications to how memory for expression nodes gets managed at all. Using a so called region-based memory management will gives us more flexibility and allows to solve the problem in a simple way.