[dpdk-dev] [PATCH] mempool: don't leak ring on failure

Richardson, Bruce bruce.richardson at intel.com
Tue Jun 24 19:41:19 CEST 2014


> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ananyev, Konstantin
> Sent: Tuesday, June 24, 2014 9:16 AM
> To: Stephen Hemminger; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] mempool: don't leak ring on failure
> 
> Hi Stephen,
> 
> >
> > If mempool can not be created because of insufficient memory
> > it returns an error but has already created a ring (and leaves it
> > behind). This prevents code from trying one mempool size and then
> > retrying with a smaller size if the bigger size fails.
> >
> > Reordering to do ring creation after getting memory fixes
> > the problem.
> >
> 
> But now, memzone created for the actual mempool could get leaked instead?
> 

Is either of these a problem that really needs to be fixed? If there is not enough memory to create the mempool what is the app likely to do, other than just quit with an error message?


More information about the dev mailing list