--- a/project_files/frontlib/util/util.h Mon Jun 11 00:06:22 2012 +0200
+++ b/project_files/frontlib/util/util.h Tue Jun 12 11:25:05 2012 +0200
@@ -13,7 +13,7 @@
char *flib_asprintf(const char *fmt, ...);
/**
- * Exactly as flib_asprintf, but accepts va_args.
+ * Exactly as flib_asprintf, but accepts a va_list.
*/
char *flib_vasprintf(const char *fmt, va_list args);
@@ -33,4 +33,16 @@
*/
void *flib_bufdupnull(const void *buf, size_t size);
+/**
+ * Simple malloc wrapper that automatically logs an error if no memory
+ * is available. Otherwise behaves exactly like malloc.
+ */
+void *flib_malloc(size_t size);
+
+/**
+ * Simple calloc wrapper that automatically logs an error if no memory
+ * is available. Otherwise behaves exactly like calloc.
+ */
+void *flib_calloc(size_t count, size_t elementsize);
+
#endif