Hi all, I'm using source code of wireshark-1.10.9 in order to modify some pieces of code in packet-data.c. I use functions to allocate memory like this:
" but when I run
" to allocate. It can run but I see the memory increasing very fast. Finally, I got the error:
when the memory is at 95% and about 1837440 packets were read even I check log and see that every time, my program only allocates 140 or 90... bytes. As mentioned in README.malloc, "The ephemeral functions allocate memory that will be automatically freed once the current packet dissection completes" but in my case, it look like the memory is not freed. So, please help if you have an idea for this:
P/S: When I use static memory allocation, it run faster and memory increases slower but still get increasing and stop after running 10 minutes. asked 24 Sep '14, 03:05 hoangsonk49 edited 25 Sep '14, 19:59 |
Hi, I suspect it's something else eating the memory - what are you doing with the sccp_sonnh array? I doupt packet-data.c is the right place to put the modification as it might be called from many dissectors not only packet-udp.c
Are you sure about this? nSccp_length couldn't take an arbittary value?
Also in "normal" cases Wireshark/tshark will run out of memory eventually because of state keept between packets. Your milage depends on the protocols in the trace and available RAM or appliction memory allocation limits.
For more information: - When I comment out these modification, it can run without any increment of memory.