qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends


From: malc
Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends
Date: Sun, 6 Dec 2009 21:12:16 +0300 (MSK)

On Sun, 6 Dec 2009, Avi Kivity wrote:

> On 12/06/2009 07:45 PM, malc wrote:
> > 
> >    
> > > > And you lose the ability to fail gracefully...
> > > > 
> > > >        
> > > We never had it.  Suppose p is allocated in response to an SCSI register
> > > write, and we allocate a scatter-gather list.  What do you do if you OOM?
> > >      
> > Uh, please do not generalize.
> > 
> >    
> 
> Sorry.
> 
> > See for instance 29ddf27b72960d6e6b115cd69812c9c57b2a7b13 the incident was
> > logged and debugged, no OOM, no abort. Not all scenarios admit this, but
> > claiming that there are none that do is incorrect.
> >    
> 
> Init is pretty easy to handle.  I'm worried about runtime where you can't
> report an error to the guest.  Real hardware doesn't oom.

Here, i do agree, but mostly because most of the users of allocation
functions just themselves returned NULL or -1 or whatever and never
really bothered to report anything, so the addition of OOM check that
you've added made the code less cluttered.

-- 
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]