Statistics
| Branch: | Revision:

root / qemu-malloc.c @ a63b5829

History | View | Annotate | Download (2.3 kB)

# Date Author Comment
f8b0953b 02/23/2010 11:36 pm Markus Armbruster

Simplify qemu_realloc()

No functional change. Bonus: looks just like qemu_malloc() now.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Aurelien Jarno <>

20ff6c80 12/12/2009 03:59 pm Anthony Liguori

Do not abort on qemu_malloc(0) in production builds

qemu_malloc() does not allow size=0 to be passed in and aborts on this behavior.

Unfortunately, there is good reason to believe that within qemu, there are a
number of, so far, undetected places that assume size=0 can be safely passed....

26d64a85 05/19/2009 09:29 pm malc

Format per CODING_STYLE

Signed-off-by: malc <>

a7d27b53 05/19/2009 09:29 pm malc

Abort on attempts to allocate zero bytes

http://marc.info/?t=124267873300015&r=1&w=2

Signed-off-by: malc <>

322691a5 02/11/2009 11:00 pm aliguori

Fix qemu_realloc() (Kevin Wolf)

For qemu_realloc with size == 0 a result of NULL is perfectly fine

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6615 c046a42c-6fe2-441c-8c8c-71466251a162

62a3fe29 02/06/2009 02:19 am aliguori

Replace exit() in oom_check with abort()

So that we can get a core dump with a stack trace.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6542 c046a42c-6fe2-441c-8c8c-71466251a162

8a1d02ab 02/06/2009 12:05 am aliguori

Terminate emulation on memory allocation failure (Avi Kivity)

Memory allocation failures are a very rare condition on virtual-memory
hosts. They are also very difficult to handle correctly (especially in a
hardware emulation context). Because of this, it is better to gracefully...

ac4b0d0c 11/09/2008 02:28 am balrog

Add qemu_strndup: qemu_strdup with length limit.

Also optimise qemu_strdup by using memcpy - using pstrcpy is usually
suboptimal.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162

62dd234f 08/25/2008 11:03 pm blueswir1

Fix error introduced by r5044

qemu_strdup() doesn't copy a last character because of off by one error.

Signed-off-by: Gleb Natapov <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5086 c046a42c-6fe2-441c-8c8c-71466251a162

363a37d5 08/21/2008 08:58 pm blueswir1

Fix OpenBSD linker warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162

2137b4cc 08/06/2008 11:37 am ths

Add qemu_realloc(), by Gerd Hoffmann.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162

17e2377a 06/09/2008 04:47 pm pbrook

Prevent guest reusing host memory allocations.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4710 c046a42c-6fe2-441c-8c8c-71466251a162