Debugging Dynamic Memory Usage Errors Using HP WDB (5900-1474; WDB 6.2; January 2011)
48 void f4_small()
49 {
50 char * cp;
51
52 cp = malloc (60);
53 }
54
55 void set_brkpt_here() {
56 }
57 int main()
58 {
59
60 for (int i=0; i<777; i++)
61 {
62 f4_small();
63 f1_small();
64 f2_small();
65 f3_small();
66 }
67 set_brkpt_here();
68
69 for (int i=0; i<1000; i++)
70 {
71 f4();
72 f1();
73 f2();
74 f3();
75
76 }
77 set_brkpt_here();
78 }
Sample Debugging Session
Memory-Debugging Features of WDB 25