[Ovmsdev] Memory owned by deceased tasks

Stephen Casner casner at acm.org
Wed Mar 21 13:34:28 HKT 2018


I removed my startup script that brought up wifi in client mode.  I
let auto init wifi run and bring up the associated services and did a
"module tasks" command to populate the task map.  Then I manually
started wifi in client mode, which caused the running wifi and
NetManTask to stop first, along with the servers, and then all come up
again.  At that point I ran "module memory" and saw that there were
two deceased tasks still holding memory, a wifi task and a NetManTask.
I then stopped wifi and started it in client mode a second time.  The
second deceased wifi did not hold onto any memory, but the second
deceased NetManTask did:

OVMS# mo m =
Free 8-bit 32684/283144, 32-bit 27552/55828, SPIRAM 0/0
--Task--     Total DRAM D/IRAM   IRAM SPIRAM   +/- DRAM D/IRAM   IRAM SPIRAM
no task*           5276      0      0      0         +0     +0     +0     +0
main*             40076      0      0      0         +0     +0     +0     +0
NetManTask*           0    264      0      0         +0     +0     +0     +0
wifi*                 0   1396      0      0         +0     +0     +0     +0
NetManTask*           0    264      0      0         +0     +0     +0     +0
esp_timer         55112      0    644      0         +0     +0     +0     +0
eventTask             0   7620      0      0         +0     +0     +0     +0
ipc0              10848      0      0      0         +0     +0     +0     +0
ipc1                 12      0      0      0         +0     +0     +0     +0
Tmr Svc               0  27812      0      0         +0     +0     +0     +0
Housekeeping      17912  32628      0      0         +0     +0     +0     +0
tiT                 136   1748      0      0         +0     +0     +0     +0
AsyncConsole          0  16384  27488      0         +0     +0     +0     +0
mdns                  0    108      0      0         +0     +0     +0     +0
wifi                  0   1596      0      0         +0     +0     +0     +0
NetManTask            0   2200      0      0         +0     +0     +0     +0

So, I don't know if the memory for the deceased wifi and NetManTask
tasks is truly leaked or represents objects still in use elsewhere.

                                                        -- Steve



More information about the OvmsDev mailing list