Re: [Linuxptp-users] The ptp4l application seems to have a memory leak (increase of memory allocati
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2012-07-07 18:36:59
|
On Sat, Jul 07, 2012 at 12:01:29PM +0200, Mario Molitor wrote: > > In the current implementation of this functions would every call of > msg_allocate() make a new message allocation, because the > condition if(!m) in msg_put() should always false and in the > consequently is msg_pool always empty. Wow, what an embarrassing collection of bugs I produced. > Attached on this email you could also find patch file Many thanks for finding this bug and the patch. I just pushed a fix (just a bit different than your patch) today. I added some compile time debugging that you might try out to verify the fix. I found that the slave mode uses 6 messages and the master mode 2, with one master and one slave and the default settings. > I think another good way to solve this behavior is to use a circular > message pool with a fix size. > > What do you think from this idea? A fixed size would be okay, but it might be hard to predict the number of messages needed for a busy bounday clock. Thanks, Richard |