Questions about MBUF allocation in bsdnet
Albert Huang
alberthuang314 at gmail.com
Mon Mar 23 14:15:09 UTC 2015
Chris Johns <chrisj at rtems.org> writes:
> On 23/03/2015 4:13 am, Albert Huang wrote:
>> Hi, all,
>>
>> During developing/tracing an Ethernet device driver for ARM, I also
>> setup an i386 RTEMS on qemu with NE2000 as a comparison. I found that
>> MBUF allocation on both hosts does not behave the same, and might be one
>> of the source of issues. One of the strange behavior is that MSIZE=128
>> on both hosts, 98-byte packets are not segmented on i386 while segmented
>> on ARM.
[stuff deleted]
BTW, there seems to be another issue related to memory leaks, and in
Section 4.2 of the document "RTEMS Network Supplement"
https://docs.rtems.org/doc-current/share/rtems/html/networking/Debug-Output.html#Debug-Output
there is an item:
====================
* mbuf activity
There are commented out calls to printf in the file sys/mbuf.h in the
network stack code. Uncommenting these lines results in output when
mbuf’s are allocated and freed. This is very useful for finding memory
leaks.
====================
But in sys/mbuf.h of current git trunk, there isn't any call of
printf. Is there any handy tool to trace mbuf memory leaks?
Any ideas/suggestions? Thanks in advance.
Albert
More information about the users
mailing list