| OCR Text |
Show Three types of events are important in displaying data structures: an allocation of new structures, a deallocation of structures, and a change of pointers. A static filter cannot capture these events since the position and the number of allocated structures are not known in advance. Therefore, the filter must adapt with dynamically changing data structures. The filter to trace data flow is shown in Figure 4.11. The filter maintains a table of all dynamically allocated memory blocks. The initialization of the filter clears the table and inserts static pointers. Since the names of the static pointers are known from the executor's source code, their addresses can be looked up in the interpreter's symbol table. 87 do { /* get new event */ dsrunsyncQ ; event = dsgetevent(); /* analyze the event */ switch (event->evcode) { /* procedure call */ case 1: draw_new_line(event); break; /* procedure return */ case 2: erase_bottom_line(event); break; /* unconditional jump */ case 3: draw_jump(event); break; /* conditional jump */ case 4: draw_branch(event); break; /* the termination of the executor */ } while (event->evcode != 5); Figure 4.10. A Director to Display Control Flow |