Eric Blake wrote:
> my understanding (although it
> may be limited, since I don't follow mingw development) is that mingw defers
> to
> the Microsoft malloc
Yes, it does (except if the executable is run emulated in 'wine').
> Do you have a pointer into the MSDN pages or the mingw source code that can
> back up your claim, before we consider applying this patch?
Looking at the msvcrt code from 2001, I can see that:
- malloc(0) is treated like malloc(small_positive_amount) in all codepaths
(they have 4 different malloc implementations under the hood!),
- when malloc returns NULL, it does *not* set errno.
Therefore the malloc-posix module must replace 'malloc', and since the
'malloc' module depends on 'malloc-posix', this module must replace 'malloc' as
well.
Bruno