added qemu_mallocz()

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@660 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2004-03-14 21:41:12 +00:00
parent caed880216
commit 07d898662d

10
osdep.c
View File

@ -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 */