[Ovmsdev] Memory leak

Stephen Casner casner at acm.org
Mon Mar 19 23:46:15 HKT 2018


On Mon, 19 Mar 2018, Michael Balzer wrote:

> I've seen some allocations looking like memory leaks but getting
> freed after a minute or two. I assume those are mongoose buffers or
> LWIP socket structs getting freed after some timeout.

These hang around for at least 5 minutes.  But some of these
allocations are 88-byte blocks that could be from LWIP allocating
mutexes for socket management.  Those are explicitly never freed.  The
following comment precedes the allocation statement:  /* one time init
and never free */ LWIP appears to use a fresh socket structure each
time until all of the sockets in the preconfigured array have been
used.  The default value is 10 sockets.

> I start dynamic tasks primarily for web command execution in
> streaming mode. The "vfs tail" command also runs as a dynamic task.

That should be covered by the use of TaskBase, as I mentioned in the
previous email.

> If you had the mDNS component still active, that could also be the cause.

This was after mDNS was disabled.

                                                        -- Steve



More information about the OvmsDev mailing list