- Timestamp:
- 06/24/14 17:54:32 (8 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- aa5a642
- Parents:
- 10e183f
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
r85e87b5 r9857d1c 642 642 DLLEXPORT void trace_destroy(libtrace_t *libtrace) { 643 643 int i; 644 assert(libtrace); 644 assert(libtrace); 645 646 /* destroy any packet that are still around */ 647 if (libtrace->first_packets.packets) { 648 for (i = 0; i < libtrace->perpkt_thread_count; ++i) { 649 if(libtrace->first_packets.packets[i].packet) { 650 trace_destroy_packet(libtrace->first_packets.packets[i].packet); 651 } 652 } 653 free(libtrace->first_packets.packets); 654 } 655 645 656 if (libtrace->format) { 646 657 if (libtrace->started && libtrace->format->pause_input) … … 681 692 free(libtrace->event.packet); 682 693 } 683 694 free(libtrace); 684 695 } 685 696 -
lib/trace_parallel.c
r5ba34eb r9857d1c 332 332 message.additional.uint64 = 0; 333 333 (*trace->per_pkt)(trace, NULL, &message, t); 334 335 // Free our last packet 336 if (packet) 337 trace_destroy_packet(packet); 334 338 335 339 // And we're at the end free the memories … … 1182 1186 } 1183 1187 libtrace_ringbuffer_init(&libtrace->packet_freelist, libtrace->packet_freelist_size, LIBTRACE_RINGBUFFER_BLOCKING); 1184 libtrace_slidingwindow_init(&libtrace->sliding_window, libtrace->packet_freelist_size, 0);1188 //libtrace_slidingwindow_init(&libtrace->sliding_window, libtrace->packet_freelist_size, 0); 1185 1189 assert(sem_init(&libtrace->sem, 0, libtrace->packet_freelist_size) == 0); 1186 1190 // This will be applied to every new thread that starts, i.e. they will block all signals
Note: See TracChangeset
for help on using the changeset viewer.