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: Laurent Desnogues
Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends
Date: Sat, 5 Dec 2009 15:14:45 +0100

Hello,

probably a stupid remark, but I'll do it anyway :-)

Let's assume there are some contexts where doing a memory
allocation with a size of 0 is invalid while in some other contexts
it is valid.  Wouldn't it make sense in that case to have two
functions that do memory allocation?

Of course such a split would require full review of existing code
and might introduce complexities for instance for realloc (was
the original memory block allocated with a possible size of 0
or not?).


Laurent




reply via email to

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