Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Motivation for wmem [was: rev 52264]

From: Bálint Réczey <balint@xxxxxxxxxxxxxxx>
Date: Mon, 30 Sep 2013 09:04:22 +0200
Hi All,

2013/9/30 Evan Huus <eapache@xxxxxxxxx>:
> On Sun, Sep 29, 2013 at 6:38 PM, Jakub Zawadzki
> <darkjames-ws@xxxxxxxxxxxx> wrote:
>> On Sun, Sep 29, 2013 at 05:35:59PM -0400, Evan Huus wrote:
>>> On Sun, Sep 29, 2013 at 3:56 PM, Jakub Zawadzki
>>> <darkjames-ws@xxxxxxxxxxxx> wrote:
>>> > But back to topic (cause you'll probably see this problem few more times).
>>> > I don't quite get a point why we need to change everything to wmem.
>>> > (To be honest I still don't quite get why we need wmem_ at all, but let's skip that).
>>>
>>> Wmem is mostly a replacement for emem, because emem was becoming
>>> impossible to maintain and reason about (recall, for example, bug
>>> #5284). If you could still deal with emem, congratulations, but the
>>> rest of us mortals needed something more comprehensible.
>>
>> Evan, I *really* don't see what wmem_ is fixing.
...
>> Still there's popular GC for C: http://www.hpl.hp.com/personal/Hans_Boehm/gc/
>> and there's alredy interested in using that: http://www.wireshark.org/lists/wireshark-dev/201210/msg00229.html
>
> I have not looked closely, but I think it would be easy to cause
> memory leaks by embedding memory addresses in packet bytes. Maybe
> worth experimenting with though.
With ASLR it would not be easy to to cause leaks and there are way
easier methods for making Wireshark allocate plenty of memory.
I gave GC a try when at the time I wrote the cited mail, but could not
get it finished in a few hours (it kept crashing on me).
It was most probably my fault, because Inkscape uses GC and if they
can get it working, it can be done for us, too.
Since no one did show any interest in using GC and Evan was already
very dedicated to migrating to wmem I did not want to push GC further.

Cheers,
Balint