First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Is there any memory leaks in wireshark?

When I open wireshark it uses some amount of memory (in the main window without opening any pcaps). After opening and closing a pcap after complete dissection, the memory usage shown in "task manager" window is increased significantly. I think that the memory usage must become as it was at the starting point, unless there is a memory leak. Am I write?

leo's avatar
1
leo
asked 2019-10-26 07:19:37 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

MAybe, maybe not, your test is not conclusive. Your assessment is based on the assumption that Wireshark only uses the C library and, by extension, the Operating Systems memory management functions. It does not, it has build in memory slab and pool features to limit impact of fragmentation. I'm not even sure how the OS memory management enhancements come into play here, not releasing memory straight away.

What could be informative if the same capture file was opened and closed multiple times. Then the memory footprint would keep increasing in case of a memory leak.

Jaap's avatar
13.7k
Jaap
answered 2019-10-26 09:02:54 +0000
edit flag offensive 0 remove flag delete link

Comments

Even the C library memory management functions typically don't release memory back to the operating system kernel when a free is done; it just adds that memory to a pool that it will try to use for future allocations.

As such, there's no guarantee that an OS tool that shows the memory usage for a process will show that the memory usage shrinks after you close a file in Wireshark.

Guy Harris's avatar Guy Harris (2019-10-26 19:36:26 +0000) edit

There's an old wiki page describing all of this: https://wiki.wireshark.org/KnownBugs/...

JeffMorriss's avatar JeffMorriss (2019-10-27 15:40:19 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer