Ignore:
Timestamp:
10/14/15 15:24:10 (6 years ago)
Author:
Shane Alcock <salcock@…>
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:
b24d186, f0cb0d4, f72e13d
Parents:
44f9892
Message:

Fix memory leak with heavily filtered RT inputs

Bucket buffers that contained entirely filtered packets were never
being freed if they weren't at the front of our bucket list, which would
chew through memory very quickly as soon as we had a non-empty bucket at
the front of the list but not enough packets to result in a batch being
spread amongst the processing threads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/combiner_ordered.c

    r44f9892 r21c0d70  
    126126        uint64_t key[trace_get_perpkt_threads(trace)]; // Cached keys
    127127        uint64_t min_key = UINT64_MAX;
    128         uint64_t prev_min = 0;
    129128        uint64_t peeked = 0;
    130129        int min_queue = -1;
     
    133132        for (i = 0; i < trace_get_perpkt_threads(trace); ++i) {
    134133                libtrace_queue_t *v = &queues[i];
    135                 if (libtrace_deque_get_size(v) != 0 &&
     134                if (libtrace_deque_get_size(v) != 0 &&
    136135                                peek_queue(trace, c, v, &peeked, NULL)) {
    137136                        live_count ++;
     
    186185                        key[min_queue] = 0;
    187186                        live_count--;
    188                         prev_min = min_key;
    189187                        min_key = UINT64_MAX; // Update our minimum
    190188                        min_queue = -1;
Note: See TracChangeset for help on using the changeset viewer.