[PATCH 1/5] d3dx9_36: Implement D3DXFileCreate. (try 3)

Max TenEyck Woodbury max at mtew.isa-geek.net
Wed Oct 24 11:46:47 CDT 2012


On 10/24/2012 12:02 PM, Rico Schüller wrote:
> On 24.10.2012 16:33, Dmitry Timoshkov wrote:
>> Christian Costa <titan.costa at gmail.com> wrote:
>>
>>>>> +    if (!object)
>>>>> +    {
>>>>> +        ERR("Out of memory\n");
>>>>> +        return E_OUTOFMEMORY;
>>>>> +    }
>>>>
>>>> The ERR() is useless here, just return E_OUTOFMEMORY in such
>>>> situations.
>>>>
>>>>
>>>>
>>> It's done this way in many places in wine.
>>
>> Then that other places need to be fixed as well. Printing an ERR() on
>> memory
>> allocation errors is not helpful.
>>
> In which cases do you use ERR? I thought it is used, when there are
> system errors. And I think ERR is fine for out of memory, because the
> system is not able to hand out the needed memory. Just do a git grep.
> There are ~400 usages for ERR and out of memory... What's your
> suggestion how to do that with the "Out of memory"?
> 
My understanding is that this is similar (although less severe) than
writing log messages when out of disk space.

The report may not be generated because the resources needed to produce
the report are not available.

The absence of the report may be taken to mean that the problem is on
some other code path.

Deliberately not reporting 'out of whatever' errors or, better yet,
commenting that reporting such errors are not being generated may make
diagnosing such problems easier.




More information about the wine-devel mailing list