ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 10068] tshark, running on MacOS 10.9, performing the stat

Date: Tue, 06 May 2014 01:03:20 +0000

Comment # 3 on bug 10068 from
Weird.

Unless I've missed something, the allocations in

    /* If we have moved into a new interval (row), create a new io_stat_item_t
struct for every interval
    *  between the last struct and this one. If an item was not found in a
previous interval, an empty
    *  struct will be created for it. */
    rt = relative_time;
    while (rt >= it->time + parent->interval) {
        it->next = (io_stat_item_t *)g_malloc(sizeof(io_stat_item_t));
        it->next->prev = it;
        it->next->next = NULL;
        it = it->next;
        mit->prev = it;

        it->time = it->prev->time + parent->interval;
        it->frames = 0;
        it->counter = 0;
        it->float_counter = 0;
        it->double_counter = 0;
        it->num = 0;
        it->calc_type = it->prev->calc_type;
        it->hf_index = it->prev->hf_index;
        it->colnum = it->prev->colnum;
    }

never get freed, so there appears to be a leak.

In practice, this leak doesn't matter, as tshark will free up the memory when
it exits; it's accumulated while it's processing packets, and needs to be kept
around until the statistics are printed and can't be freed until then.

So, *if* this is the issue, the problem isn't that this is a leak, the problem
appears to be that it's consuming a lot more memory on Mavericks than on
Mountain Lion.

I'm not sure why - "leaks" reports it as an 80-byte allocation on both
platforms.  Perhaps there's some per-allocation overhead "leaks" doesn't
mention that's greater on Mavericks than on Mountain Lion.  I'll see if a quick
look at the Mountain Lion and Mavericks malloc source shows anything.


You are receiving this mail because:
  • You are watching all bug changes.