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: Tue, 8 Dec 2009 13:22:05 +0300 (MSK)

On Tue, 8 Dec 2009, Markus Armbruster wrote:

> malc <address@hidden> writes:
> 

[..snip..]

> glibc frees since 1999.  From glibc/ChangeLog.10:
> 
> 1999-04-28  Andreas Jaeger  <address@hidden>
> 
>       * malloc/malloc.c (REALLOC_ZERO_BYTES_FREES): Define it to follow
>       ISO C9x and Unix98.

Problem is - this is NOT what C9x where x > 0 says.

> 
> > How anyone can use this interface and it's implementations portably
> > or "sanely" is beyond me.
> >
> > Do read the discussion the linked above.
> 
> Yes, malloc() & friends are tricky for portable programs.  And yes,
> bugs do creep into international standards.
> 
> But since we wrap malloc() & friends anyway, we can pick a variant of
> the semantics we like.  No need to punish ourselves with wrappers that
> are hard to use, just because the wrappees are hard to use.
> 
> Anyway, I figure this thread has wandered off topic for this list.
> 

-- 
mailto:address@hidden




reply via email to

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