git-svn-id: http://ltt.polymtl.ca/svn@235 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Sep 2003 17:30:49 +0000 (17:30 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Sep 2003 17:30:49 +0000 (17:30 +0000)
ltt/branches/poly/include/ltt/ltt-private.h
ltt/branches/poly/ltt/tracefile.c

index 55a2e0e1bc401d0217af4bfc31b98c29f8302b51..94bc1ebd6c614ca7d6b9f15bfb2afaa40ea9475b 100644 (file)
@@ -137,6 +137,7 @@ struct _LttTracefile{
 
   LttTime prev_block_end_time;       //the end time of previous block
   LttTime prev_event_time;           //the time of the previous event
+  LttEvent an_event;
 };
 
 struct _LttTrace{
index bf2af685da903f8bdc30670b18ff888e58d89d9b..05978a489b306d15f632a086674c6919506ab7ac 100644 (file)
@@ -149,7 +149,6 @@ void ltt_tracefile_open_control(LttTrace *t, char * control_name)
       }else if(ev->event_id == TRACE_BLOCK_END){
        break;
       }else g_error("Not valid facilities trace file\n");
-      g_free(ev);
     }
   }
 }
@@ -705,7 +704,6 @@ void ltt_tracefile_seek_time(LttTracefile *t, LttTime time)
          g_print("End of file\n");      
          return;
        }
-       g_free(ev);
        lttTime = getEventTime(t);
        err = timecmp(&lttTime, &time);
        if(err >= 0)return;
@@ -755,7 +753,7 @@ void ltt_tracefile_seek_time(LttTracefile *t, LttTime time)
 
 LttEvent *ltt_tracefile_read(LttTracefile *t)
 {
-  LttEvent * lttEvent = (LttEvent *)g_new(LttEvent, 1);
+  LttEvent * lttEvent = &t->an_event;
   int err;
 
   if(t->cur_event_pos == t->buffer + t->block_size){
This page took 0.025219 seconds and 4 git commands to generate.