> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Friday, January 26, 2018 5:00 PM > To: Varghese, Vipin <vipin.vargh...@intel.com>; Van Haaren, Harry > <harry.van.haa...@intel.com> > Cc: sta...@dpdk.org; dev@dpdk.org > Subject: Re: [dpdk-stable] [PATCH v2] app/procinfo: Fix memory leak by > rte_service_init > > 11/01/2018 20:47, Vipin Varghese: > > When procinfo is run multiple times against primary application, it > > consumes huge page memory by rte_service_init. Which is not released > > at exit of application. > > > > Invoking rte_service_finalize to real memory and prevent memory leak. > > I don't think it is correct to call rte_service_finalize in applications, > while rte_service_init is called in EAL. > > Maybe we need a new function in EAL.
Yes correct - we need a rte_eal_deinit(), cleanup() or finalize() or something. This ties in with splitting EAL to be more modular on startup, and DPDK in general behaving more like a library and less like a single-monolith. For the 18.02 timeframe, the simplest solution to solve the secondary process mem-leak issue than to merge into these applications, unfortunately. The only other option I see is to add an rte_eal_finalize() function, and hide this call behind it, however it is quite late to add such a function, and what do we do with cases like rte_panic(), rte_exit(), or system signals like SIGINT, SIGHUP etc? It seems too complicated to add "quickly" to me. If there is technically a better solution viable in the given timeframe, I'm open to suggestions?