+
+#ifndef MDEBUG
+/** Allocate memory.
+ * @param[in] size Number of bytes to allocate.
+ * @param[in] x Type of allocation (ignored).
+ * @param[in] y Name of file doing allocation (ignored).
+ * @param[in] z Line number doing allocation (ignored).
+ * @return Newly allocated block of memory.
+ */
+void* DoMalloc(size_t size, const char* x, const char* y, int z)
+{
+ void* t = malloc(size);
+ if (!t)
+ (*noMemHandler)();
+ return t;
+}
+
+/** Allocate zero-initialized memory.
+ * @param[in] size Number of bytes to allocate.
+ * @param[in] x Type of allocation (ignored).
+ * @param[in] y Name of file doing allocation (ignored).
+ * @param[in] z Line number doing allocation (ignored).
+ * @return Newly allocated block of memory.
+ */
+void* DoMallocZero(size_t size, const char* x, const char* y, int z)
+{
+ void* t = malloc(size);
+ if (!t)
+ (*noMemHandler)();
+ memset(t, 0, size);
+ return t;
+}
+
+/** Resize an allocated block of memory.
+ * @param[in] orig Original block to resize.
+ * @param[in] size Minimum size for new block.
+ * @param[in] file Name of file doing reallocation (ignored).
+ * @param[in] line Line number doing reallocation (ignored).
+ */
+void* DoRealloc(void *orig, size_t size, const char *file, int line)
+{
+ void* t = realloc(orig, size);
+ if (!t)
+ (*noMemHandler)();
+ return t;
+}
+#endif