aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/zalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/zalloc.c')
-rw-r--r--com32/lib/zalloc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/com32/lib/zalloc.c b/com32/lib/zalloc.c
new file mode 100644
index 00000000..2a58a11e
--- /dev/null
+++ b/com32/lib/zalloc.c
@@ -0,0 +1,17 @@
+/*
+ * zalloc.c
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+void *zalloc(size_t size)
+{
+ void *ptr;
+
+ ptr = malloc(size);
+ if ( ptr )
+ memset(ptr, 0, size);
+
+ return ptr;
+}