return;
}
if(foot->Magic != MAGIC_FOOT) {
- Warning("free - Footer magic is invalid (%p, 0x%x)\n", head, foot->Magic);
+ Warning("free - Footer magic is invalid (%p, %p = 0x%x)\n", head, &foot->Magic, foot->Magic);
return;
}
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
}
}
#endif
+
+// === EXPORTS ===
+EXPORT(malloc);
+EXPORT(realloc);
+EXPORT(free);