Ethereal-dev: [Ethereal-dev] What to do, if Ethereal is running out of memory?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sat, 09 Oct 2004 10:28:23 +0200
Hi List!

Colleques noticed me, that Ethereal will simply terminate, if capture is running until out of memory (or you load a *very large* capture file which doesn't fit into your memory).

I would think this is a very undesired behaviour, as you cannot do anything in that case.

Of course, you can use ringbuffers for capturing, or split the capture file before opening, but that's not the point here.


Having a look at the memory allocation documentation of glib (as we typically use g_alloc/g_free, or functions which uses them), I found:


     Note

If any call to allocate memory fails, the application is terminated. This also means that there is no need to check if the call succeeded.


(http://developer.gnome.org/doc/API/2.0/glib/glib-Memory-Allocation.html)

Hmm, and I don't see a way how we can circumvent that.


Anyone got a good idea to solve this problem, or a way to warn the user if that could happen?

Or maybe a good suggestion for the GTK/GLib people to find a long term solution for this?

Regards, ULFL