Improved VTerm support
[tpg/acess2.git] / Kernel / heap.c
index 0bffaec..0e3c5f4 100644 (file)
@@ -368,6 +368,22 @@ void *realloc(void *__ptr, size_t __size)
        return NULL;
 }
 
+/**
+ * \fn void *calloc(size_t num, size_t size)
+ * \brief Allocate and Zero a buffer in memory
+ * \param num  Number of elements
+ * \param size Size of each element
+ */
+void *calloc(size_t num, size_t size)
+{
+       void    *ret = malloc(num*size);
+       if(ret == NULL) return NULL;
+       
+       memset( ret, 0, num*size );
+       
+       return ret;
+}
+
 /**
  * \fn int IsHeap(void *Ptr)
  * \brief Checks if an address is a heap address

UCC git Repository :: git.ucc.asn.au