diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-03-14 21:41:12 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-03-14 21:41:12 +0000 |
commit | 07d898662d9aa173ac2d5c0aa4c9a1cf39caa703 (patch) | |
tree | 65e205bed7c596cd47d886fc2f0b77e81827962b /osdep.c | |
parent | caed880216f3572b5f33691f46c934e1d0faccb2 (diff) | |
download | qemu-07d898662d9aa173ac2d5c0aa4c9a1cf39caa703.tar.gz qemu-07d898662d9aa173ac2d5c0aa4c9a1cf39caa703.tar.bz2 qemu-07d898662d9aa173ac2d5c0aa4c9a1cf39caa703.zip |
added qemu_mallocz()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@660 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'osdep.c')
-rw-r--r-- | osdep.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -281,6 +281,16 @@ void *qemu_malloc(size_t size) #endif +void *qemu_mallocz(size_t size) +{ + void *ptr; + ptr = qemu_malloc(size); + if (!ptr) + return NULL; + memset(ptr, 0, size); + return ptr; +} + /****************************************************************/ /* printf support */ |